|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2004-04-21 11:02 UTC] asif at evoknow dot com
 Description:
------------
When  a string like "04/04/04 0045" is passed to strtotime(), it returns -1. 
Reproduce code:
---------------
echo "The following line rightly shows the correct date time\r\n";
echo date("m/d/y Hi", strtotime("04/04/04 2345"));
echo "\r\nBut the following line fails to show the correct date time\r\n";
echo date("m/d/y Hi", strtotime("04/04/04 0045"))."\r\n";
Expected result:
----------------
The following line rightly shows the correct date time
04/04/04 2345
But the following line fails to show the correct date time
04/04/04 0045
Actual result:
--------------
The following line rightly shows the correct date time
04/04/04 2345
But the following line fails to show the correct date time
01/01/70 0559
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
'00' is the designation for midnight as returned by the date() function, as in: date('m/d/Y Hi') For sanity's sake, it really should work.