#34676 [NEW]: strtotime("midnight") fails
| From: | rajiv at alum dot mit dot edu | Date: | Thu, 29 Sep 2005 04:20:05 +0000 |
| Subject: | #34676 [NEW]: strtotime("midnight") fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-85751@lists.php.net to get a copy of this message | ||
From: rajiv at alum dot mit dot edu
Operating system: linux, os x
PHP version: 4.4.0
PHP Bug Type: Date/time related
Bug description: strtotime("midnight") fails
Description:
------------
strtotime() should be able to parse "midnight" and "noon".
Reproduce code:
---------------
echo strtotime("midnight");
echo strtotime("noon");
Expected result:
----------------
echo strtotime("midnight");
should print the time stamp for the next midnight
(midnight tomorrow).
echo strtotime("noon");
should print the time stamp for the next noon
(noon today/tomorrow depending on the current time).
echo strtotime("12:00 am");
echo strtotime("12 am");
echo strtotime("12:00 pm");
echo strtotime("12 pm");
all do the correct things.
Actual result:
--------------
echo strtotime("midnight");
returns -1.
echo strtotime("noon");
returns -1.
--
Edit bug report at http://bugs.php.net/?id=34676&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34676&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34676&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34676&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34676&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34676&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34676&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34676&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34676&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34676&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34676&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34676&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34676&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34676&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34676&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34676&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34676&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34676&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34676&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34676&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34676&r=mysqlcfg