1.mktime
Mktime ($hour = null, $minute = NULL, $second = NULL, $month = NULL, $day = NULL, $year = NULL, $is _DST = null)
Hour, minute, number of seconds, month, day, year mktime (' 17 ', ' 23 ', ' 35 ');
2.strtotime
Strtotime (Time,now)
| Parameters |
Description |
| Time |
Specifies the time string to parse. |
| Now |
The timestamp used to calculate the return value. If this argument is omitted, the current time is used. |
<?phpecho (Strtotime ("Now")); Now the Time Echo (Strtotime ("3 October 2005")); October 3, 2005 Echo (Strtotime ("+5 hours")); Add five hours of Echo (Strtotime ("+1 Week")); Plus one week Echo (Strtotime ("+1 Week 3 days 7 hours 5 Seconds")); Plus one week Three days seven hours Five seconds Echo (Strtotime ("Next Monday")); Next Monday Echo (Strtotime ("Last Sunday")); Last Sunday?>
Output:
1138614504112829040011386325041139219304113950370911391804001138489200
PHP timestamp function