Re: TimeZone List - Mailing list pgsql-general

From Naz Gassiep
Subject Re: TimeZone List
Date
Msg-id 465CDDBC.5070102@mira.net
Whole thread Raw
In response to Re: TimeZone List  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: TimeZone List
List 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

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SELECT from mytbl;
Next
From: Michael Fuhr
Date:
Subject: Re: function retuning refcursor, order by ignored?