[PHP]时间操作

来源:互联网 发布:无线hdmi 知乎 2017 编辑:程序博客网 时间:2024/06/06 00:39

1.在某个时间上加一个小时

$lastTime =  date("Y-m-d", strtotime("2017-07-21"));$lastTime = date( "Y-m-d H:i:s",  strtotime("+1 hour", strtotime($lastTime)));

网上给的都是当前时间增加一个小时,千篇一律的一个样

$afterOneHour = date("Y-m-d",strtotime("+1 hour"));
原创粉丝点击