pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedWhy can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
2+ messages / 2 participants
[nested] [flat]
* Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
@ 2006-03-02 22:33 Davidson, Robert <robdavid@amazon.com>
0 siblings, 1 reply; 2+ messages in thread
From: Davidson, Robert @ 2006-03-02 22:33 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause?
@ 2006-03-02 22:49 Michael Fuhr <mike@fuhr.org>
parent: Davidson, Robert <robdavid@amazon.com>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2006-03-02 22:49 UTC (permalink / raw)
To: Davidson, Robert <robdavid@amazon.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-03-02 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-02 22:33 Why can't I use daylight savings time aware time zones with the AT TIME ZONE clause? Davidson, Robert <robdavid@amazon.com>
2006-03-02 22:49 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox