From: | araza(at)esri(dot)com |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | How to get TimeZone name? |
Date: | 2011-01-18 19:35:14 |
Message-ID: | 2971B487BB423B4FBB3E74910BE51D75066AB9F438@redmx2.esri.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
How can I get timezone name? I can get timezone offset but I could not find any reference of timezone name.
pg_timezone_names does not provide information I am looking for. For example, my system's time zone is set to ' US/Pacific'. If I select timezone name for the offset '-08:00:00' then I do not get what I am expecting.
I have a default setting for timezone and lc_time in my postgresql.conf file.
1-
sde10=> Select current_timestamp - current_timestamp AT TIME ZONE 'UTC' As TimeZoneOffSet;
timezoneoffset
----------------
-08:00:00
(1 row)
2-
sde10=> select * from pg_timezone_names where utc_offset = '-08:00:00';
name | abbrev | utc_offset | is_dst
---------------------+--------+------------+--------
America/Dawson | PST | -08:00:00 | f
America/Ensenada | PST | -08:00:00 | f
America/Los_Angeles | PST | -08:00:00 | f
America/Tijuana | PST | -08:00:00 | f
America/Vancouver | PST | -08:00:00 | f
America/Whitehorse | PST | -08:00:00 | f
Canada/Pacific | PST | -08:00:00 | f
Canada/Yukon | PST | -08:00:00 | f
Etc/GMT+8 | GMT+8 | -08:00:00 | f
Mexico/BajaNorte | PST | -08:00:00 | f
Pacific/Pitcairn | PST | -08:00:00 | f
PST8PDT | PST | -08:00:00 | f
US/Pacific | PST | -08:00:00 | f
US/Pacific-New | PST | -08:00:00 | f
(14 rows)
Thanks.
Ale
From | Date | Subject | |
---|---|---|---|
Next Message | A.M. | 2011-01-18 19:52:16 | excessive escaping in regular expression functions |
Previous Message | Tom Lane | 2011-01-18 19:34:23 | Re: Getting a sample data set. |