Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
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 recognizedselect '2005-02-25 00:00:00 -800' AT TIME ZONE 'America/Chicago' as interval
...
ERROR: time zone "america/chicago" not recognizedHowever 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:00select '2005-02-25 00:00:00 -800' AT TIME ZONE 'CDT' as interval
2005-02-25 03:00:00Setting 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/Chicagoselect version();
PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC 2.95.3Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
Many thanks,
Robert Davidson
Re: Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
On Thu, Mar 02, 2006 at 02:33:08PM -0800, Davidson, Robert wrote: > 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 This works only since 8.1. Here's an excerpt from the 8.1 Release Notes: * Allow the full use of time zone names in AT TIME ZONE, not just the short list previously available (Magnus) -- Michael Fuhr