#41841 [NEW]: strtotime() with year + comma before month+day yields time 72420 secs dif
From: wc_robot at yahoo dot com
Operating system: Linux/Unix
PHP version: 5.2.3
PHP Bug Type: Date/time related
Bug description: strtotime() with year + comma before month+day yields time 72420 secs dif
Description:
------------
The year and comma placed before the month and day return a timestamp that
is 72,420 seconds (~20+ hours) later than the value returned when the year
comes after the month and date.
Reproduce code:
---------------
Example #1:
<?php echo strtotime('2007, Feb 1').' '.strtotime('Feb 1, 2007');
?>
Return: 1170382020 1170309600
(and 1170382020 - 1170309600 = 72420)
Example #2:
<?php echo strtotime('2007, Jun 28').' '.strtotime('Jun 28, 2007');
?>
Return: 1183079220 1183006800
(and 1183079220 - 1183006800 = 72420)
Expected result:
----------------
I expect the two values in each different example to yield the same
timestamp.
Actual result:
--------------
The values are always 72,420 seconds different
--
Edit bug report at http://bugs.php.net/?id=41841&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41841&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41841&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41841&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41841&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41841&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41841&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41841&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41841&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41841&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41841&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41841&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41841&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41841&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41841&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41841&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41841&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41841&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41841&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41841&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41841&r=mysqlcfg
Thread (2 messages)
- wc_robot at yahoo dot com