Re: Question about timezones

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Steven Klassen <sklassen(at)commandprompt(dot)com>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about timezones
Date: 2004-10-08 13:52:00
Message-ID: 11847.1097243520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> But it doesn't seem to work to actually work out times across the
> world w.r.t. daylight savings.
> ...
> For example, this script works out, given a time in one timezone, what
> it was in another timezone:

What we need for that is the ability for AT TIME ZONE to specify a
DST-aware zone name. Right now it can only take DST-ignorant zone
names. So you can do
('2004-12-01 12:0:0' AT TIME ZONE 'AESST') AT TIME ZONE 'MEWT'
but not
('2004-12-01 12:0:0' AT TIME ZONE 'Australia/Sydney') AT TIME ZONE 'Europe/Amsterdam'
which of course is what you want.

The infrastructure needed for this is finally present in 8.0, ie we have
the timezone data available, but actually teaching AT TIME ZONE about it
didn't get done in time. Likely it will appear in 8.1 (especially if
you step up and do the work ;-)).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phil Endecott 2004-10-08 14:07:27 pg_restore -l and schema name
Previous Message Michael Glaesemann 2004-10-08 13:33:08 Re: when to use NULL and when to NOT NULL DEFAULT ''