note 30820 added to function.strtotime

From: Date: Mon, 31 Mar 2003 14:14:13 +0000
Subject: note 30820 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-46012@lists.php.net to get a copy of this message
Is this a bug? I was told it's not, so beware. If your in the UK and the date is 31 March 2003 GMT (clocks just went forward here), under windows check to see if 'Automatically adjust clock for daylight saving changes' is ticked. <? function last_sunday() { return gmdate("Y-m-d", strtotime("Last Sunday GMT")); } echo "Last Sunday is returned as: ".last_sunday(); ?> If Daylight savings is on, the above will return: 2003-03-29 - (wrong) If Daylight savings is off, the above will return: 2003-03-30 By changing the gmdate to date, or strtotime to mktime )or gmmktime) the problem still exists. Also the keywork GMT (in strtotime) also fails. I can't seems to get the above code to work with both exceptions!! -- http://www.php.net/manual/en/function.strtotime.php http://master.php.net/manage/user-notes.php?action=edit+30820 http://master.php.net/manage/user-notes.php?action=delete+30820 http://master.php.net/manage/user-notes.php?action=reject+30820

« previous php.notes (#46012) next »