Re: AT TIME ZONE and DST in UTC<->CET conversion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Jaromír Talíř <jaromir(dot)talir(at)nic(dot)cz>, pgsql-general(at)postgresql(dot)org
Subject: Re: AT TIME ZONE and DST in UTC<->CET conversion
Date: 2008-08-23 16:33:16
Message-ID: 4307.1219509196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> The problem is that one of these two statements is using the abbrev
>> meaning and the other is using the timezone meaning.

> Is this a TODO?

We already fixed it:

2008-07-07 14:09 tgl

* src/backend/utils/adt/: date.c, timestamp.c (REL8_1_STABLE),
date.c, timestamp.c (REL8_3_STABLE), date.c, timestamp.c
(REL8_2_STABLE), date.c, timestamp.c: Fix AT TIME ZONE (in all
three variants) so that we first try to interpret the timezone
argument as a timezone abbreviation, and only try it as a full
timezone name if that fails. The zic database has four zones (CET,
EET, MET, WET) that are full daylight-savings zones and yet have
names that are the same as their abbreviations for standard time,
resulting in ambiguity. In the timestamp input functions we
resolve the ambiguity by preferring the abbreviation, and AT TIME
ZONE should work the same way. (No functionality is lost because
the zic database also has other names for these zones, eg
Europe/Zurich.) Per gripe from Jaromir Talir.

Backpatch to 8.1. Older releases did not have the issue because AT
TIME ZONE only accepted abbreviations not zone names. (Thus, this
patch also arguably fixes a compatibility botch introduced at 8.1:
in ambiguous cases we now behave the same as 8.0 did.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-08-23 17:41:41 Re: psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully
Previous Message Ivan Sergio Borgonovo 2008-08-23 16:28:31 psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully