Re: Timestamp Conversion Woes Redux

From: Christian Cryder <c(dot)s(dot)cryder(at)gmail(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Timestamp Conversion Woes Redux
Date: 2005-07-20 17:05:36
Message-ID: 90876a9e0507201005277e4a0a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 7/20/05, Kris Jurka <books(at)ejurka(dot)com> wrote:
> Currently everything works if the client and server are in
> the same timezone which is 99% of the time.

Just to clarify - this is not technically correct. If you have a
zoneless timestamp in the db, and your client and server are running
in daylight savings time, and that date happens to fall in DST "no
man's land" (eg. between 1 and 2 AM on fist Sunday in April), that
value WILL get munged when you read it, and it stays munged when you
write it back - regardless of how the column is declared in the db.

This is a function of the timestamp getting flattened to a String
(which in turn uses a Calendar, which in turn applies DST to display a
"valid" time, which in turn munges the data).

So there is a scenario where the dates will still get munged even
though client and server are in the same timezone. And that's a
problem.

Christian

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2005-07-20 17:41:35 Re: Timestamp Conversion Woes Redux
Previous Message Kris Jurka 2005-07-20 16:29:33 Re: Timestamp Conversion Woes Redux