|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-04-04 22:19 UTC] aharvey@php.net
-Status: Open
+Status: Duplicate
[2018-04-04 22:19 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
Description: ------------ 3月获取上月时间戳时获取的是28天前时间戳,当月29-31日时,获取的是3月时间戳 Test script: --------------- /*在2018-03-29执行如下代码*/ /*In the 2018-03-29 execute the following code*/ echo $a = time()-strtotime('-1 month').'<br />';//2419200 echo $a/3600/24;echo '<br />';//28 echo $m = date('m',strtotime('-1 month'));//03