ID:               51081
 Updated by:       degeb...@php.net
 Reported By:      mike dot turpin at gmail dot com
 Status:           Open
-Bug Type:         Documentation problem
+Bug Type:         Date/time related
 Operating System: Windows Vista
 PHP Version:      5.2.12
 New Comment:

Seems to be a bug in the 5.2 branch. Reclassifying.

====================
dan...@daniel-laptop:~$ php -r 'echo
phpversion().PHP_EOL.date("g:ia",strtotime("24:00")).PHP_EOL;'
5.3.1
12:00am

dan...@daniel-laptop:~$ ~/src/php-5.2.12/sapi/cli/php -r 'echo
phpversion().PHP_EOL.date("g:ia",strtotime("24:00")).PHP_EOL;'
5.2.12
1:00am
====================


Previous Comments:
------------------------------------------------------------------------

[2010-02-18 13:47:03] mike dot turpin at gmail dot com

Description:
------------
I suspect that this is a documentation problem in strtotime rather than
a bug, but I think it should be pointed out in the doc as it's easy to
fall into the trap.

strtotime("24:00") returns false

If you then have:

  date("g:ia",strtotime("24:00"))

You will get 1:00am but might be expecting 12:00am





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=51081&edit=1

Reply via email to