From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | <oliver(at)opencloud(dot)com> |
Cc: | <emergency(dot)shower(at)gmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>, <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Timestamp weirdness |
Date: | 2005-07-26 14:10:43 |
Message-ID: | s2e5fe21.047@gwmta.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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(at)opencloud(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter.Zoche | 2005-07-26 14:17:19 | Re: SQLException and error code |
Previous Message | Oliver Jowett | 2005-07-26 14:04:20 | Re: SQLException and error code |