php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22017 Unexpected error in date() (timestamp from strtotime())
Submitted: 2003-02-02 15:01 UTC Modified: 2003-02-03 16:49 UTC
From: k.schroeder@php.net Assigned:
Status: Closed Package: Date/time related
PHP Version: 4CVS-2003-02-02 (stable) OS: Windows 2000 Server
Private report: No CVE-ID:
 [2003-02-02 15:01 UTC] k.schroeder@php.net
Running ext/standard/tests/time/002.phpt on W2k server produce a warning:

"Warning: date() [/phpmanual/function.date.html]: Unexpected error ..."

Example code:
date ("Y-m-d H:i:s\n", strtotime ("Dec 21  12:16"));

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-03 16:49 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

The error is more descriptive now. The cause for this problem is that you are trying to generate a date string based on a timestamp earlier then Jan 1 1970, which something that is not supported by Win32.
 [2003-03-17 05:50 UTC] digitalsoul at gmx dot at
hm, bad and good news in one message togheter. my heart jumped as i read "bug fixed". so installed 4.3.2RC1 and all i got was an "win32 does not support ..". ok, it's much  better than a system crash. but i really hope that the date function will handle also negativ values on windows - some day.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 09:02:23 2014 UTC