Re: [pgsql-hackers-win32] Weird new time zone

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] Weird new time zone
Date: 2004-07-22 10:58:27
Message-ID: 40FF9DD3.1060004@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oliver Jowett wrote:

> The only timezones that get positive scores during startup are:
>
> DEBUG: TZ "Antarctica/McMurdo" gets max score 2080
> DEBUG: TZ "Antarctica/South_Pole" gets max score 2080
> DEBUG: TZ "Pacific/Auckland" gets max score 2080
> DEBUG: TZ "NZ" gets max score 2080
>
> Either of "NZ" or "Pacific/Auckland" would be correct.

Looking in the timezone data files, it appears that those two Antarctica
timezones are identical to the NZ ones back to 1956. The CVS code only
scans back to 1964.

Increasing MAX_TEST_TIMES to scan back 50 years produces this:

> DEBUG: TZ "Antarctica/McMurdo" scores 2534: at -442152000 1955-12-28 12:00:00 std versus 1955-12-29 00:00:00 std
> DEBUG: TZ "Antarctica/South_Pole" scores 2534: at -442152000 1955-12-28 12:00:00 std versus 1955-12-29 00:00:00 std
> DEBUG: TZ "Pacific/Auckland" gets max score 2600
> DEBUG: TZ "NZ" gets max score 2600

and it picks Pacific/Auckland.

Also I'm a bit nervous about that hardcoded 2004 start date for the scan
in pgtz.c -- that will presumably break if the timezone data files are
updated for post-2004 changes without a corresponding change to the scan
code. Would it make sense to scan backwards from the current system time
to a predetermined year?

-O

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2004-07-22 11:15:27 Re: [pgsql-hackers-win32] Weird new time zone
Previous Message Oliver Jowett 2004-07-22 10:11:29 Re: [pgsql-hackers-win32] Weird new time zone