Re: Timestamp weirdness
От | Kevin Grittner |
---|---|
Тема | Re: Timestamp weirdness |
Дата | |
Msg-id | s2e5fe21.047@gwmta.wicourts.gov обсуждение исходный текст |
Ответ на | Timestamp weirdness ("emergency.shower@gmail.com" <emergency.shower@gmail.com>) |
Список | 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@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
В списке pgsql-jdbc по дате отправления: