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

From: Jaromír Talíř <jaromir(dot)talir(at)nic(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: AT TIME ZONE and DST in UTC<->CET conversion
Date: 2008-07-05 10:12:04
Message-ID: 1215252724.3017.12.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

First, if I do conversion from UTC to CET and back when a timestamp is
OUTSIDE of daylight saving period, it's correct:

postgres# select '2008-01-01 10:10:10 UTC' AT TIME ZONE 'CET';
timezone
---------------------
2008-01-01 11:10:10

postgres# select '2008-01-01 11:10:10 CET' AT TIME ZONE 'UTC';
timezone
---------------------
2008-01-01 10:10:10

When I do the same INSIDE this period just the UCT->CET direction is
correct but back direction will fail subtracting only 1 hour instead of
2 hours.

postgres# select '2008-06-01 10:10:10 UTC' AT TIME ZONE 'CET';
timezone
---------------------
2008-06-01 12:10:10

postgres# select '2008-06-01 12:10:10 CET' AT TIME ZONE 'UTC';
timezone
---------------------
2008-06-01 11:10:10

If it supports automatic discovery of DST in conversion from UTC to CET
(and this is great), why it doesn't support this discovery in opposit
direction?

Regards,
Jaromir

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-07-05 12:05:31 Re: AT TIME ZONE and DST in UTC<->CET conversion
Previous Message Krzysztof Barlik 2008-07-05 00:39:46 Re: pg_dumpall asking for password for each database