Re: Timestamp Summary - Mailing list pgsql-jdbc

From emergency.shower@gmail.com
Subject Re: Timestamp Summary
Date
Msg-id bdf1a09805072515515f30d261@mail.gmail.com
Whole thread Raw
In response to Timestamp Summary  (Christian Cryder <c.s.cryder@gmail.com>)
List pgsql-jdbc
On 7/25/05, Christian Cryder <c.s.cryder@gmail.com> wrote:
> [...]
> This piece of code only needs to get executed when the connection is
> first opened to the DB, and from that point on it will ensure that the
> db is in functionally the same timezone as the server (taking DST
> on/off into account as well). In other words, if my client is running
> in MST w/ DST turned off, the server will be configured to etc/gmt+7,
> and any dates I insert will be left untouched.
>
> That make sense?

Hi Christian,

Besides setTimestamp(int, Timestamp) and getTimestamp(int) we have the
more general methods setTimestamp(int, Timestamp, Calendar) and
getTimestamp(int, Calendar).

If I understand the specs correctly, calls to the methods without a
Calendar parameter should be equivalent to the call to the other
methods with a Calendar that has time zone TimeZone.getDefault().

From this it follows that modifying the VM's default time zone is a
non-solution.

Moreover in my opinion the database server's time zone should be
ignored by any client (application and JDBC driver) code.

Regards,
Alex

pgsql-jdbc by date:

Previous
From: "Tomasz Szczeszynski"
Date:
Subject: UNSUBSCRIBE
Next
From: "emergency.shower@gmail.com"
Date:
Subject: Re: Timestamp weirdness