php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45647 strtotime() returning 1999-11-30 for 00-00-00 00:00:00
Submitted: 2008-07-28 16:40 UTC Modified: 2008-07-28 19:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jon dot reed at jellyfish dot co dot uk Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.2.6 OS: Centos 5.1
Private report: No CVE-ID:
 [2008-07-28 16:40 UTC] jon dot reed at jellyfish dot co dot uk
Description:
------------
As per bug #41523 which is reported fixed on Vista.

We're running a custom build RPM of 5.2.6
It looks like this bug has reappeared:

$incorrect = '1999-11-30';
$time = date('Y-m-d',strtotime('00-00-00 00:00:00')); 
$this->assertNotEqual($time, $incorrect);

This fails SimpleTest.

php -r "echo date('Y-m-d',strtotime('00-00-00 00:00:00'));"
1999-11-30

Reproduce code:
---------------
echo strtotime('00-00-00 00:00:00');

Expected result:
----------------
-1

Actual result:
--------------
943920000

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-28 19:17 UTC] derick@php.net
There is no bug here, 00-00-00 means 2000-00-00, which is 1999-12-00, which is 1999-11-30. No bug, perfectly normal.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 02:02:10 2014 UTC