Re: Date class - NY Time

From: Date: Wed, 01 Sep 2004 03:17:27 +0000
Subject: Re: Date class - NY Time
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14361@lists.php.net to get a copy of this message
Worked it out: $date= new Date(); $ny_tz= new Date_Timezone("America/New_York"); $date->converttz($ny_tz);
I spoke too soon: $mydate = new Date(); $mylocaltz = new Date_Timezone("America/New_York"); print "Sydney: " . $mydate->format("%Y-%m-%d %H:%M:%S %p") . "<br>\n"; $mydate->convertTZ($mylocaltz); print "NY: " . $mydate->format("%Y-%m-%d %H:%M:%S %p") . "<br>\n"; Produces: Sydney: 2004-09-01 13:15:11 pm NY: 2004-09-01 09:15:11 am when it should produce: Sydney: 2004-09-01 13:15:11 pm NY: 2004-08-31 23:15:11 pm Is there a bug?

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