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

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [pgsql-hackers-win32] Weird new time zone
Дата
Msg-id 40FF9DD3.1060004@opencloud.com
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] Weird new time zone  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: [pgsql-hackers-win32] Weird new time zone
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: [pgsql-hackers-win32] Weird new time zone
Следующее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: [pgsql-hackers-win32] Weird new time zone