pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Kris Jurka <books@ejurka.com>
Cc: John R Pierce <pierce@hogranch.com>
Cc: Christian Cryder <c.s.cryder@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp Conversion Woes Redux
Date: Wed, 20 Jul 2005 16:14:09 -0400
Message-ID: <083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0507201450060.19284@leary.csoft.net>
References: <90876a9e05071810503606d431@mail.gmail.com>
	<42DCF0C9.4030501@opencloud.com>
	<23396.1121781259@sss.pgh.pa.us>
	<392278AB-987F-40CF-B59D-DDF53B9A4ACF@fastcrypt.com>
	<Pine.BSO.4.56.0507191100110.68@leary.csoft.net>
	<90876a9e050719093261c52c64@mail.gmail.com>
	<Pine.BSO.4.56.0507200109220.31980@leary.csoft.net>
	<42DDF238.8090601@opencloud.com>
	<Pine.BSO.4.56.0507201125190.5339@leary.csoft.net>
	<24020.1121881295@sss.pgh.pa.us>
	<90876a9e05072010475d161b94@mail.gmail.com>
	<B3BA4316-26FB-4C7B-BAE4-AAC2F9B6574C@fastcrypt.com>
	<42DEA450.5070606@hogranch.com>
	<Pine.BSO.4.56.0507201450060.19284@leary.csoft.net>

I think using the same time zone as the server is the only way to go:

Kris has proposed a patch which would set the servers time zone to  
the JVM when the connection is started

This can still be broken if  someone were to change the default  
timezone after the connection was initiated.

If we do the reverse and save the servers timezone for the purposes  
of creating the timestamp object we don't run into this problem, even  
if someone were to issue a set timezone='newtimezone' we will still  
get the notice and can update the
stored server timezone for the connection.

Dave
On 20-Jul-05, at 3:50 PM, Kris Jurka wrote:

>
>
> On Wed, 20 Jul 2005, John R Pierce wrote:
>
>
>> as we discovered the hard way, named timezones are a BAD IDEA.      
>> We had some
>> stuff in java + jdbc + postgres that used a timezone, when it was  
>> brought up in
>> Singapore, their local timezone memnonic wasn't recognized by  
>> postgres, and
>> when it was brought up in China, CST was misinterpretted as  
>> Central Standard
>> Time rather than China Standard Time (about 12 hours off)
>>
>>
>
> No, this indicates that *abbreviated* timezones are a bad idea, not  
> named
> timezones.
>
> Kris Jurka
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>




view thread (92+ messages)  latest in thread

Message-ID: <083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com>
Permalink:  ../083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com/
Also on:    postgresql.org/message-id/083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com

 · 

reply

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: pg@fastcrypt.com, books@ejurka.com, pierce@hogranch.com, c.s.cryder@gmail.com, tgl@sss.pgh.pa.us, oliver@opencloud.com
  Subject: Re: Timestamp Conversion Woes Redux
  In-Reply-To: <083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com>
  References: <90876a9e05071810503606d431@mail.gmail.com> <42DCF0C9.4030501@opencloud.com> <23396.1121781259@sss.pgh.pa.us> <392278AB-987F-40CF-B59D-DDF53B9A4ACF@fastcrypt.com> <Pine.BSO.4.56.0507191100110.68@leary.csoft.net> <90876a9e050719093261c52c64@mail.gmail.com> <Pine.BSO.4.56.0507200109220.31980@leary.csoft.net> <42DDF238.8090601@opencloud.com> <Pine.BSO.4.56.0507201125190.5339@leary.csoft.net> <24020.1121881295@sss.pgh.pa.us> <90876a9e05072010475d161b94@mail.gmail.com> <B3BA4316-26FB-4C7B-BAE4-AAC2F9B6574C@fastcrypt.com> <42DEA450.5070606@hogranch.com> <Pine.BSO.4.56.0507201450060.19284@leary.csoft.net> <083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.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