返回自从 Unix 新纪元(格林威治时间 1970 年 1 月 1 日 00:00:00)到当前时间的秒数。
int time() |
按给定参数产生时间量。
int mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]]) |
由当前时间或给定时间产生新的时间戳
int strtotime ( string time [, int now]) |
示例:
<?php echo strtotime ("now"), "\n"; echo strtotime ("10 September 2000"), "\n"; echo strtotime ("+1 day"), "\n"; echo strtotime ("+1 week"), "\n"; echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n"; echo strtotime ("next Thursday"), "\n"; echo strtotime ("last Monday"), "\n"; ?> |
相关主题: