<?php
Header ("Content-type:text/html;charset=utf-8");
Set Beijing time as the default time zone
Date_default_timezone_set (' PRC ');
Output Current Time
echo Date ("Y-m-d h:i:s", Time ()); 2018-01-30 10:30:32
Get a time stamp for the wee hours of the day
$today = Strtotime (Date ("y-m-d"), Time ());
Echo ' <br> ';
Echo $today; 1470844800
Echo ' <br> ';
Verify that the time stamp is correct early in the day
echo Date ("Y-m-d h:i:s", $today); 2016-08-11 00:00:00
Echo ' <br> ';
24-point timestamp of the day
$end = $today +6024;
Verify that the 24-point timestamp is correct on the day
echo Date ("Y-m-d h:i:s", $end); 2018-01-30 00:00:00
Echo ' <br> ';
Gets the timestamp of 0 points at the specified time
$time = Strtotime (' 2018-01-30 ');
Echo ' <br> ';
Echo $time; 1401984000
Echo ' <br> ';
Verifies whether the timestamp is a specified time
echo Date ("Y-m-d h:i:s", $time); 2018-01-30 00:00:00
?>
PHP timestamp problems with a few small examples