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

From: Date: Fri, 08 Apr 2005 22:08:28 +0000
Subject: #32588 [Com]: strtotime() error for 'last xxx' DST problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76547@lists.php.net to get a copy of this message
ID: 32588 Comment by: cdarklock at injuryfree dot com Reported By: alan at ridersite dot org Status: Assigned Bug Type: Date/time related Operating System: Linux PHP Version: 4.3.10 Assigned To: derick New Comment: Having same bug on 5.0.3; looks to be a simple fix in parsedate.y for someone that knows his way around it, but I'm not that someone. Previous Comments: ------------------------------------------------------------------------ [2005-04-05 14:32:55] derick@php.net Might be a duplicate, but will check it out. ------------------------------------------------------------------------ [2005-04-05 14:21:21] alan at ridersite dot org 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 this bug report at http://bugs.php.net/?id=32588&edit=1

« previous php.bugs (#76547) next »