ini_set(‘date.timezone‘,‘Asia/Shanghai‘);
http://www.w3school.com.cn/php/func_date_strtotime.asp
strtotime() 函数将任何英文文本的日期时间描述解析为 Unix 时间戳。
<?php
echo(strtotime("now"));
echo(strtotime("3 October 2005"));
echo(strtotime("+5 hours"));
echo(strtotime("+1 week"));
echo(strtotime("+1 week 3 days 7 hours 5 seconds"));
echo(strtotime("next Monday"));
echo(strtotime("last Sunday"));
?>
输出:
1138614504 1128290400 1138632504 1139219304 1139503709 1139180400 1138489200
原文:http://www.cnblogs.com/CyLee/p/5496768.html