Re: Weird new time zone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird new time zone
Date: 2004-07-10 19:23:31
Message-ID: 19544.1089487411@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> On Sat, Jul 10, 2004 at 12:40:21PM -0400, Tom Lane wrote:
>> Perhaps, rather than just probing a few selected years, we had better
>> check every year since 1970 ...

> What if we tell the user what the detected timezone is at some point,
> and tell them that it's only a heuristic? So if somebody gets a wrong
> timezone, they can select the correct one in postgresql.conf.

That's the ultimate fallback in any case. But it would be nice if it
"just worked" in as many cases as possible. (Or should I revert the
hack that made it work for *your* timezone? ;-))

I was initially thinking that probing a large number of test times
would be expensive, but on second thought I don't see that it would
be a problem. On nearly all the entries in the TZ database, we'd
reject on the first or second probe time anyway; only very near
matches such as in Chris' example would need multiple checks. We
could probably check every Sunday from 1970-1-1 to current time
without making any visible difference in the speed of postmaster
launch ... and I think we might *have* to do that, if there are any
cases where similar zones differ only in the specific dates of
DST start/end.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-10 19:31:03 Re: [BUGS] BUG #1118: Misleading Commit message
Previous Message Alvaro Herrera 2004-07-10 19:23:12 Re: Nested Transactions, Abort All

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bill Moran 2004-07-10 19:44:38 Re: win32 port
Previous Message Alvaro Herrera 2004-07-10 19:11:37 Re: win32 port