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

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

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
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)

Re: pgsql-server: Still another try at matching system

From
Bruce Momjian
Date:
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