Re: Weird new time zone - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Weird new time zone
Date
Msg-id 19544.1089487411@sss.pgh.pa.us
Whole thread Raw
In response to Re: Weird new time zone  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Weird new time zone  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PgSQL 7.4.2 - NaN on Tru64 UNIX
Next
From: Alvaro Herrera
Date:
Subject: Re: Nested Transactions, Abort All