php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70394 Date value is not right.
Submitted: 2015-08-31 08:03 UTC Modified: 2015-08-31 08:15 UTC
From: xjiujiu at foxmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.4Git-2015-08-31 (Git) OS: Win10 64bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xjiujiu at foxmail dot com
New email:
PHP Version: OS:

 

 [2015-08-31 08:03 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-31 08:11 UTC] xjiujiu at foxmail dot com
My Mistake, The date format is wrong...Sorry~
 [2015-08-31 08:15 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2015-08-31 08:15 UTC] requinix@php.net
Yeah, 'm' is month and not minute.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC