Re: BUG #3948: date/time functions returning wrong value - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #3948: date/time functions returning wrong value
Date
Msg-id 20080211022253.GA8277@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #3948: date/time functions returning wrong value  (Magnus Hagander <magnus@hagander.net>)
Responses Re: BUG #3948: date/time functions returning wrong value  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #3948: date/time functions returning wrong value  (Magnus Hagander <magnus@hagander.net>)
List pgsql-bugs
Magnus Hagander wrote:
> Tom Lane wrote:

>> This does suggest that we'll need to revisit the win32_tzmap[] list
>> every so often?
>
> Seems so. It's the first time I've heard of a timezone being *added* and
> not just changed, but obviously it does happen :-(

Hmm, was this table manually built?  I think I see a mistake.  It has
two entries for "Mexico Standard Time", one of which (the one at GMT-6)
is mapped to America/Mexico_City (which I think would be correct), and
the other at America/La_Paz (the one at -7).  This latter one I think is
mistaken -- firstly because the Windows name is probably something else
and not "Mexico Standard Time" (perhaps "Western Mexico Std Time" or
something like that?), and secondly because America/La_Paz refers to
Bolivia's La Paz and not Mexico's.  Mexico's La Paz should probably be
mapped to America/Chihuahua or America/Mazatlan.

It's hard to tell though -- I am not sure how does Windows define
timezones.  I have always been annoyed by the fact that Chilean timezone
is nowhere near it's database (I think the closest is Bogota, but it's
really bogus because it's not even in the same hemisphere).  Fortunately
this means there's no bogus entry for Chile in this struct ...

I think what I conclude from this is that Windows TZ database is so
bogus that we should avoid trying to rely on it -- I say if the user
does not set "timezone" in postgresql.conf, refuse to start.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: "Gevik Babakhani"
Date:
Subject: Re: BUG #3951: SELECT ... WHERE Param = ? does not work if Param is of type bytea
Next
From: Tom Lane
Date:
Subject: Re: BUG #3948: date/time functions returning wrong value