Re: Date & Time with time zone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wei Wei" <wei725(at)lycos(dot)com>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Date & Time with time zone
Date: 2006-04-11 02:54:01
Message-ID: 3224.1144724041@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Wei Wei" <wei725(at)lycos(dot)com> writes:
> In the application, the data is reported as
>
> Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time
>
> But, in the DB, it is stated as
>
> 2006-04-09 14:40:53.093-07
>
> It doesn't seen right to me. Both are on the same box and the
> date column is with time zone.

It looked odd to me too, but you haven't told us anything useful.
What's the platform, what's the PG version, how exactly did you get the
value from PG (is it "select now()", or what?), what exactly do you have
PG's TIMEZONE variable set to? And what application are you comparing
the results to? Calling "PDT" "Pacific Standard Time" doesn't exactly
leave me with warm fuzzies about that application's level of timezone-fu,
whatever it is.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Randall Lucas 2006-04-11 02:54:46 Calculating a hash / fingerprint for a row / tuple
Previous Message Thomas F. O'Connell 2006-04-11 01:08:30 Re: How to find the latest (partial) WAL file