0
点赞
收藏
分享

微信扫一扫

php计算时间差转化时间戳函数strtotime

夏天的枫_ 2022-02-11 阅读 56
PHP


$fromTime = date("Y-m-d H:i:s", strtotime("-60 MINUTE"));//当前时间上一个小时的时间;
echo(strtotime("now") . "<br>");
echo(strtotime("15 October 1980") . "<br>");
echo(strtotime("+5 hours") . "<br>");
echo(strtotime("+1 week") . "<br>");
echo(strtotime("+1 week 3 days 7 hours 5 seconds") . "<br>");
echo(strtotime("next Monday") . "<br>");
echo(strtotime("last Sunday"));

Done!



举报

相关推荐

0 条评论