Bug #76161 [Opn->Dup]: 上一个月时间戳获取错误

From: Date: Wed, 04 Apr 2018 22:19:06 +0000
Subject: Bug #76161 [Opn->Dup]: 上一个月时间戳获取错误
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214602@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76161&edit=1

 ID:                 76161
 Updated by:         aharvey@php.net
 Reported by:        147037524 at qq dot com
 Summary:            上一个月时间戳获取错误
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            Date/time related
 Operating System:   all
 PHP Version:        7.0.28
 Block user comment: N
 Private report:     N

 New Comment:

This is a duplicate of a lot of bugs; let's go with bug #62193 as the best explanation on the
first page of Google.


Previous Comments:
------------------------------------------------------------------------
[2018-03-29 10:09:08] 147037524 at qq dot com

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



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76161&edit=1


Thread (2 messages)

« previous php.bugs (#214602) next »