Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Weird new time zone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>,pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: [HACKERS] Weird new time zone
Date: 2004-07-16 03:11:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>> It occurs to me that with a check this thorough, we might be 
>> able to finesse the problem on Windows with the system 
>> returning very nonstandard timezone abbreviations.

> It does *not* pick up my timezone.

Drat.  I assume from your domain name that Europe/Stockholm would
actually be the best choice for you?  What Windows timezone setting
are you using for this test?

 The following possibilities are rejected per:
> DEBUG:  Reject TZ "Europe/Stockholm": at 16844400 1970-07-15 00:00:00
> std versus 1970-07-15 01:00:00 dst

If you look in src/timezone/data/europe you will see that the zic
database thinks Sweden was on strict GMT+1 (no daylight savings) between
1916 and 1980, and since 1980 they were on EU daylight-savings rules.
Does that square with your ideas of reality?  (If it does not then we
should just punt the problem upstream to the zic people, but I will
assume here that their research is good.)

What I suspect given the above is that Windows has no clue about
historical reality and is retroactively applying the current DST rules
back to 1970, thus deciding that 1970-07-15 was on DST when it was
really not.

I have seen related problems on my own machine.  HPUX 10.20 seems to not
have its facts entirely straight concerning US daylight-savings laws
that were in effect in the 1970s; our current code fails to match
against the system behavior because of this.

I thought about restricting the scope of the TZ testing to start in 1990
or so to avoid this, but that seems certain to fall foul of the other
problem, which is distinguishing closely-related timezones (cf Chris
K-L discovering that he lives in Antarctica, a few days back...)

Maybe the whole match-on-behavior approach is wrong and we need to do
something else, but I'm really unsure what.  Ideas?

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Dario V. FassiDate: 2004-07-16 03:13:01
Subject: Re: Very strange Error in Updates - Worst than ever !
Previous:From: Oliver JowettDate: 2004-07-16 00:17:54
Subject: Re: Very strange Error in Updates

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-07-16 03:19:10
Subject: Re: [HACKERS] Weird new time zone
Previous:From: Steve HoldowayDate: 2004-07-16 00:55:52
Subject: Re: postgresql as windows 2000 service problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group