ID: 49116
Updated by: [email protected]
Reported By: undoluck at gmail dot com
-Status: Open
+Status: Bogus
-Bug Type: Unknown/Other Function
+Bug Type: Date/time related
Operating System: win server2003
PHP Version: 5.2SVN-2009-07-31 (snap)
New Comment:
12am (which you should never use according to some docs :) is actually
00:00 in 24h clock. No bug here.
Previous Comments:
------------------------------------------------------------------------
[2009-07-31 02:32:50] undoluck at gmail dot com
Description:
------------
strftime -- strtotime
Reproduce code:
---------------
---
>From manual page: function.strftime
---
<?php
date_default_timezone_set('PRC');
$str1 = "07/31/2009 12:00:00 AM";
$t1 = strtotime($str1);
var_dump($t1);
echo "\nt1: ".strftime("%I:%M:%S %p", $t1);
echo "\nt1: ".strftime("%H:%M:%S", $t1);
echo "\n ".date('m/d/Y H:i:s', $t1);
?>
Expected result:
----------------
t1: 12:00:00 AM
t1: 12:00:00
07/31/2009 12:00:00
Actual result:
--------------
int(1248969600)
t1: 12:00:00 AM
t1: 00:00:00
07/31/2009 00:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49116&edit=1