From: | "Wei Wei" <wei725(at)lycos(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Date & Time with time zone |
Date: | 2006-04-11 05:05:58 |
Message-ID: | 20060411050558.49B1FCA0AF@ws7-4.us4.outblaze.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for your response, Tom.
And please see the below.
> > 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.
>
My development box is Window XP and the depolyment box is Linux. I
observe the issue on the both platforms although I haven't done a
thorough test on the deployment box. And both PG versions are 8.0.x.
A returned value of "select new()" is correct, but the TZ is -7 where
the TZ of OS is set to Pacific Day Time Saving Time. The application is
written with Java. And I use the Java API Calendar class to match
with the PG data type timestamp with time zone through Hibernate. The
date log message is from the getTime and getTimezone methods of the
class. Both are correct at this point.
I do some search on various forums of the java.sun.com. It might
relate with the jdbc driver. Shall I move this issue to the jdbc mailing
list?
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-04-11 05:13:20 | Re: Date & Time with time zone |
Previous Message | Mark Aufflick | 2006-04-11 04:26:17 | Re: LW Boston |