#44404 [Opn->WFx]: strtotime('last Sunday') broken after DST change

From: Date: Tue, 18 Mar 2008 12:40:21 +0000
Subject: #44404 [Opn->WFx]: strtotime('last Sunday') broken after DST change
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123418@lists.php.net to get a copy of this message
ID: 44404 Updated by: derick@php.net Reported By: gdonald at gmail dot com -Status: Open +Status: Wont fix Bug Type: Date/time related Operating System: Debian GNU/Linux PHP Version: 4.4.8 New Comment: We are sorry, but we can not support PHP 4 related problems anymore. Momentum is gathering for PHP 6, and we think supporting PHP 4 will lead to a waste of resources which we want to put into getting PHP 6 ready. Previous Comments: ------------------------------------------------------------------------ [2008-03-11 02:31:28] gdonald at gmail dot com Description: ------------ strtotime( 'last Sunday' ) produces an incorrect value. Reproduce code: --------------- echo "Current time():\n"; echo date( 'Y-m-d H:i:s', time() ); echo "\nBroken strtotime( 'last Sunday' )\n"; echo date( 'Y-m-d H:i:s', strtotime( 'last Sunday' ) ); echo "\n"; Expected result: ---------------- I expect to see the date 2008-03-09, the correct value for strtotime( 'last Sunday' ), today being 2008-03-10, a Monday. Actual result: -------------- strtotime( 'last Sunday' ) produces 2008-03-08 23:00:00, a value one hour short of correct. Seems like an issue with the recent daylight savings time change. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44404&edit=1

« previous php.bugs (#123418) next »