#32588 [NEW]: strtotime() error for 'last xxx' DST problem

From: Date: Tue, 05 Apr 2005 12:21:21 +0000
Subject: #32588 [NEW]: strtotime() error for 'last xxx' DST problem
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76379@lists.php.net to get a copy of this message
From: alan at ridersite dot org Operating system: Linux PHP version: 4.3.10 PHP Bug Type: Date/time related Bug description: strtotime() error for 'last xxx' DST problem Description: ------------ strtotime() in error when DST is bridged. Code illustrates bug Reproduce code: --------------- echo date('D Y/m/d/H:i:s', time()). "<br>"; echo date('D Y/m/d/H:i:s', strtotime('last saturday')). "<br>"; echo date('D Y/m/d/H:i:s', strtotime("last sunday")). "<br>"; echo date('D Y/m/d/H:i:s', strtotime('last monday')). "<br>"; Expected result: ---------------- Tue 2005/04/05/08:15:48 Sat 2005/04/02/00:00:00 Sun 2005/04/03/00:00:00 Mon 2005/04/04/00:00:00 Actual result: -------------- Tue 2005/04/05/08:15:48 Fri 2005/04/01/23:00:00 Sat 2005/04/02/23:00:00 Mon 2005/04/04/00:00:00 -- Edit bug report at http://bugs.php.net/?id=32588&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32588&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32588&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32588&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32588&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32588&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32588&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32588&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32588&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32588&r=support Expected behavior: http://bugs.php.net/fix.php?id=32588&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32588&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32588&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32588&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32588&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32588&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32588&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32588&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32588&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32588&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32588&r=mysqlcfg

« previous php.bugs (#76379) next »