码迷,mamicode.com
首页 > Web开发 > 详细

PHP时间戳

时间:2015-01-15 17:43:16      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:

strtotime

  strtotime("Today"); #今天凌晨0点的时间戳

  strtotime(‘now‘);     #当前时间的时间戳

  strtotime ( "10 September 2000" ); #2000年九月10号时间戳

  strtotime ( "+1 day" );  #24小时后时间戳

  strtotime ( "+1 week" ); #一周后时间戳

  strtotime ( "+1 week 2 days 4 hours 2 seconds" );

  strtotime ( "next Thursday" ); #下周四时间戳

  strtotime ( "last Monday" );     #上周一时间戳

 

strtotime(‘日[数字] 月[英文] 年[数字]‘);

 

 

echo strtotime ( "today +3 hours" );echo ‘<br />‘; #今日三点
echo strtotime (‘today +3 hours +1 day‘); #明日三点

PHP时间戳

标签:

原文地址:http://www.cnblogs.com/songphp/p/4226439.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!