Bug #70394 [Com]: Date value is not right.
| From: | xjiujiu at foxmail dot com | Date: | Mon, 31 Aug 2015 08:11:36 +0000 |
| Subject: | Bug #70394 [Com]: Date value is not right. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195642@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70394&edit=1
ID: 70394
Comment by: xjiujiu at foxmail dot com
Reported by: xjiujiu at foxmail dot com
Summary: Date value is not right.
Status: Open
Type: Bug
Package: Date/time related
Operating System: Win10 64bit
PHP Version: 5.4Git-2015-08-31 (Git)
Block user comment: N
Private report: N
New Comment:
My Mistake, The date format is wrong...Sorry~
Previous Comments:
------------------------------------------------------------------------
[2015-08-31 08:03:36] xjiujiu at foxmail dot com
Description:
------------
strtotime("2015-08-31 11:18:07") -> int(1440991087)
date(1440991087) -> string(19) "2015-08-31 11:08:07"
strtotime('2015-08-31 11:08:07') -> int(1440990487)
Test script:
---------------
$time = strtotime("2015-08-31 11:18:07");
var_dump($time);
echo date('Y-m-d H:m:s', $time);
$sTime = strtotime('2015-08-31 11:08:07');
var_dump($sTime);
echo date('Y-m-d H:m:s', $sTime);
Expected result:
----------------
2015-08-31 11:08:07
Actual result:
--------------
2015-08-31 11:18:07
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70394&edit=1