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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 11:01:37 2025 UTC