From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: oliver@opencloud.com
Cc: emergency.shower@gmail.com
Cc: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: Timestamp weirdness
Date: Tue, 26 Jul 2005 09:10:43 -0500
Message-ID: <s2e5fe21.047@gwmta.wicourts.gov> (raw)
This explains why my suggestion would not work -- I was aware that
specifying a timezone to a TIMESTAMP WITHOUT TIME ZONE resulted in the
time zone being completely ignored -- I assumed that handling of the
value string for a timestampz within the protocol would follow the same
rules. This also explains why it works correctly when people convert
the timestamp into a string with the desired time zone and insert that
as a literal in place of the ? within the PreparedStatement.
Thanks for the info.
I assume that the behavior of the server when receiving a timestampz
within the protocol couldn't be changed to match the handling of a
literal without breaking significant existing code.
-Kevin
>>> Oliver Jowett <oliver@opencloud.com> 07/25/05 6:08 PM >>>
If the target type is actually timestamp (TIMESTAMP WITHOUT TIME ZONE),
the server converts the instant identified by the timestamptz value
using the server's TimeZone setting to get a local date/time, and stores
that.
The string -> timestamp conversion
*completely ignores* the supplied timezone, just using the specified
date/time directly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, oliver@opencloud.com, emergency.shower@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Timestamp weirdness
In-Reply-To: <s2e5fe21.047@gwmta.wicourts.gov>
References: <s2e5fe21.047@gwmta.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox