From: Oliver Jowett <oliver@opencloud.com>
To: Ken Johanson <pg-user@kensystem.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp without Timezone and differing client / server tzs
Date: Wed, 09 Jul 2008 16:42:02 +1200
Message-ID: <4874419A.6030705@opencloud.com> (raw)
In-Reply-To: <48743F0C.6020504@kensystem.com>
References: <4873154E.6020808@kensystem.com>
<4873201F.1000700@opencloud.com>
<487439D8.2050508@kensystem.com>
<48743B53.4000002@opencloud.com>
<48743F0C.6020504@kensystem.com>
Ken Johanson wrote:
> Oliver Jowett wrote:
>> Ken Johanson wrote:
>>
>>> So, short of passing a calendar to setTimezone, there is no other way
>>> to indicate to the driver that zone-less date/time type values should
>>> be translated to the server's different timezone, is this correct?
>>
>> You could change the client JVM's default timezone I suppose.
>>
>> I still don't understand exactly what you are trying to do, though.
>>
>
> I could probably summarize it best by saying that I would like to place
> all the server-specific info (including timezone) into the connection
> URL, and leave the app to only pass what it and the jvm otherwise
> considers to be a implicit/local timestamp.
>
> To put it another way, Timestamp being a long integer, a point in time
> that is the same anywhere, and we let the driver and database(s)
> connectivity implicitly handle it's string nature in sql/iso8601.
>
> This is useful where plural databases (not under my control) may exist
> each in different timezones, and the app must deal with each
> concurrently; where storing server configs (separate from the URL) and
> passing Calendar objects for each, could be avoided.
But if you are using timestamp-without-timezone in each database, I
don't understand why the server timezone comes into the equation at all?
04:05 as a ts-without-tz in any database is going to end up as 04:05 in
the client JVM's default timezone regardless of what the server timezone is.
If you want to identify absolute points in time (as Timestamp does) then
you should be using timestamp with timezone, surely? The datatype name
is somewhat misleading: it doesn't actually store timezone info at all,
it actually identifies a unique point in time, and then represents that
in whatever timezone you request - i.e. it's a much better match to
java.sql.Timestamp than ts-without-timezone is.
Can you give me some concrete examples of schema + app code and how you
would want it to behave?
-O
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: oliver@opencloud.com, pg-user@kensystem.com
Subject: Re: Timestamp without Timezone and differing client / server tzs
In-Reply-To: <4874419A.6030705@opencloud.com>
References: <4873154E.6020808@kensystem.com> <4873201F.1000700@opencloud.com> <487439D8.2050508@kensystem.com> <48743B53.4000002@opencloud.com> <48743F0C.6020504@kensystem.com> <4874419A.6030705@opencloud.com>
* 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