pgsql-server: Still another try at matching system timezone nicely.

Started by Tom Lanealmost 22 years ago2 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
Still another try at matching system timezone nicely. On non-Windows
machines, break tie scores by preferring shorter zone names over longer;
for names of equal length, prefer the alphabetically first name. This
yields for example 'EST5EDT' not 'America/New_York' for US eastern time.
On Windows, abandon the whole concept of inspecting the detailed behavior
of the system TZ library, because it doesn't bear inspection :-(. Instead
use a hardwired mapping table to select our zone name based on the
result of strftime %Z output. Windows code from Magnus Hagander.

Modified Files:
--------------
pgsql-server/src/timezone:
pgtz.c (r1.20 -> r1.21)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/timezone/pgtz.c.diff?r1=1.20&r2=1.21)

#2Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#1)
Re: pgsql-server: Still another try at matching system

Excellent!

---------------------------------------------------------------------------

Tom Lane wrote:

Log Message:
-----------
Still another try at matching system timezone nicely. On non-Windows
machines, break tie scores by preferring shorter zone names over longer;
for names of equal length, prefer the alphabetically first name. This
yields for example 'EST5EDT' not 'America/New_York' for US eastern time.
On Windows, abandon the whole concept of inspecting the detailed behavior
of the system TZ library, because it doesn't bear inspection :-(. Instead
use a hardwired mapping table to select our zone name based on the
result of strftime %Z output. Windows code from Magnus Hagander.

Modified Files:
--------------
pgsql-server/src/timezone:
pgtz.c (r1.20 -> r1.21)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/timezone/pgtz.c.diff?r1=1.20&r2=1.21)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073