Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?

From: "Davidson, Robert" <robdavid(at)amazon(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
Date: 2006-03-02 22:33:08
Message-ID: D224B13DA625924883A3B024CD6608F001A6B048@exchg-sea5-03.ant.amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I would like to use daylight savings time aware time zones to display dates, but can't seem to get them to work no matter what alias I use:
>
> select '2005-02-25 00:00:00 -800' AT TIME ZONE 'CST6CDT' as interval
> ...
> ERROR: time zone "cst6cdt" not recognized
>
> select '2005-02-25 00:00:00 -800' AT TIME ZONE 'America/Chicago' as interval
> ...
> ERROR: time zone "america/chicago" not recognized
>
> However non-aware time zones are available:
> select '2005-02-25 00:00:00 -800' AT TIME ZONE 'CST' as interval
> 2005-02-25 02:00:00
>
> select '2005-02-25 00:00:00 -800' AT TIME ZONE 'CDT' as interval
> 2005-02-25 03:00:00
>
> Setting the time zone works just fine
> set time zone 'America/Chicago';
> Query returned successfully with no result in 20 ms.
>
> set time zone 'CST6CDT';
> Query returned successfully with no result in 20 ms.
>
>
> There is a file ../pgsql/share/timezone/CST6CDT
> And ../pgsql/share/timezone/America/Chicago
>
> select version();
> PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC 2.95.3
>
> Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
>
> Many thanks,
>
> Robert Davidson

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2006-03-02 22:49:50 Re: Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
Previous Message Tom Lane 2006-03-02 19:10:53 Re: [SQL] Interval subtracting