Re: BUG #3948: date/time functions returning wrong value

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jorge Campins <jrcampins(at)cantv(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3948: date/time functions returning wrong value
Date: 2008-02-11 02:22:53
Message-ID: 20080211022253.GA8277@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-02-11 02:33:46 Re: BUG #3948: date/time functions returning wrong value
Previous Message Gevik Babakhani 2008-02-10 22:09:16 Re: BUG #3951: SELECT ... WHERE Param = ? does not work if Param is of type bytea