Re: Re: Date class - NY Time
| From: | Bob Bell | Date: | Fri, 03 Sep 2004 06:26:43 +0000 |
| Subject: | Re: Re: Date class - NY Time | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14385@lists.php.net to get a copy of this message | ||
On Wed, Sep 01, 2004 at 01:17:27PM +1000, Leonie <leonie@mungbeans.com.au> wrote:
$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 amI don't know anything about the Date package, but it looks like what you are printing for "Sydney" is actually GMT.
when it should produce: Sydney: 2004-09-01 13:15:11 pm NY: 2004-08-31 23:15:11 pm-- Bob Bell <bbell@users.sourceforge.net>