Re: Date and timezone issue

From: Date: Mon, 08 May 2006 17:44:06 +0000
Subject: Re: Date and timezone issue
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24006@lists.php.net to get a copy of this message
I thought so to, but I looked into the code and saw that if the current date is IN DST (Daylight Saving Time) It will add another hour the to the date and it is already one hour too many. After thinking a bit further I saw that EST is already in daylight saving time. And in America it is now not DST! So I had to subtract the hour from EST (to get to EDT) and then do the same code: $oNow = new Date(); $oNow->setTZById('EST'); if (!$oNow->inDaylightTime()) { $oNow->subtractSeconds(60*60); } $oNow->convertTZbyID('Europe/Amsterdam'); This does the trick! Thanx for helping! Regards, - Charlie On 8 May 2006, at 19:27, bertrand Gugger wrote:
Bonsoir, Could that be some SST thing ? (Summer Saving Time) --toggg


« previous php.pear.general (#24006) next »