Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: valid timezone abbreviations/displaying timezone value?


  • From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
  • To: Aditya <aditya(at)grot(dot)org>
  • Cc: <sfpug(at)postgresql(dot)org>
  • Subject: Re: valid timezone abbreviations/displaying timezone value?
  • Date: Fri, 16 May 2003 15:25:31 -0700 (PDT)
  • Message-id: <20030516151750.A83239-100000@megazone23.bigpanda.com> <text/plain>

On Fri, 16 May 2003, Aditya wrote:

> I have a timestamp column that I'd like to display in a user-defined timezone
> with:
>
>   select updated at time zone $TZONE from page;
>
> where $TZONE is a PG-valid timezone abbreviations.
>
> 1) Does anyone have a list of valid timezone abbreviations?

The best one I know of is in the source
(src/backend/utils/adt/datetime.c).

> 2) Is there a way to get the timezone to display in the above select for each
> row returned? (it only shows if I don't specify the time zone)

I can't think of one that actually works.

> In general, "at time zone foo" seems to be a rather poorly documented command
> -- the only mention I can easily find is in the _Practical Postgresql_ book,
> where it says "PostgreSQL supports the use of all ISO standard time zone
> abbreviations" (p.76). That would be helpful if I could find a list of
> standard ISO time zone abbrevs -- Google yielded
> http://greenwichmeantime.com/info/timezone.htm which doesn't have abbrevs for
> all timezones and PG doesn't seem to accept timezones in 'GMT+X' notation...

In 7.4, I seem to be able to say at time zone interval 'n hours'.  It
seems to do wierd things in 7.3, I think there was an issue with a
function returning the wrong type.





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group