Re: TimeZone List

From: Naz Gassiep <naz(at)mira(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: TimeZone List
Date: 2007-05-30 02:13:16
Message-ID: 465CDDBC.5070102@mira.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera wrote:
> alvherre=# select * from pg_timezone_names ;
> name | abbrev | utc_offset | is_dst
> ----------------------------------+--------+------------+--------
> Africa/Algiers | CET | 01:00:00 | f
> Africa/Luanda | WAT | 01:00:00 | f
> Africa/Porto-Novo | WAT | 01:00:00 | f
> Africa/Gaborone | CAT | 02:00:00 | f
> Africa/Ouagadougou | GMT | 00:00:00 | f
> Africa/Bujumbura | CAT | 02:00:00 | f
> Africa/Douala | WAT | 01:00:00 | f
> Africa/Bangui | WAT | 01:00:00 | f
> Africa/Ndjamena | WAT | 01:00:00 | f
> Africa/Kinshasa | WAT | 01:00:00 | f
> Africa/Lubumbashi | CAT | 02:00:00 | f
> Africa/Brazzaville | WAT | 01:00:00 | f
> Africa/Abidjan | GMT | 00:00:00 | f
> Africa/Djibouti | EAT | 03:00:00 | f
> Africa/Cairo | EEST | 03:00:00 | t
> Africa/Malabo | WAT | 01:00:00 | f
> Africa/Asmera | EAT | 03:00:00 | f
> ...
>
> alvherre=# select * from pg_timezone_abbrevs ;
> abbrev | utc_offset | is_dst
> --------+------------+--------
> ACSST | 10:30:00 | t
> ACST | -04:00:00 | t
> ACT | -05:00:00 | f
> ADT | -03:00:00 | t
> AESST | 11:00:00 | t
> AEST | 10:00:00 | f
> AFT | 04:30:00 | f
> AKDT | -08:00:00 | t
> AKST | -09:00:00 | f
> ALMST | 07:00:00 | t
> ...
>

Ok, that's kinda cool. But can I trust those names to not change from
version to version?

And how are conflicts in the abbreviations handled? (for example, EST is
a valid time zone for the US and Australia).

Also, whats with the
"Etc/GMT+x" timezones? I assume they are just standard integer offset
values? I'd probably filter them out in the app using "WHERE
substring(name FROM 0 FOR 3) <> "Etc" are there any caveats for doing this?

Thanks,
- Naz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2007-05-30 02:29:12 Re: function retuning refcursor, order by ignored?
Previous Message Alvaro Herrera 2007-05-30 02:04:19 Re: SELECT <all fields except "bad_field"> from mytbl;