Re: BUG #5466: Asia/Novosibirsk timezone problem

Lists: pgsql-bugs
From: "Dmitry Funk" <diffor(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 17:44:35
Message-ID: 201005191744.o4JHiZWF040637@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5466
Logged by: Dmitry Funk
Email address: diffor(at)gmail(dot)com
PostgreSQL version: 8.4.4
Operating system: Windows 2003 R2
Description: Asia/Novosibirsk timezone problem
Details:

Current system timezone: Asia/Novosibisk

PostgreSQL on query "show timezone" show answer "Asia/Almaty"

Asia/Novosibisk has daylight saving time
Asia/Almaty NOT has daylight saving time
and result of now() is wrong

Workaround: "timezone = 'Asia/Novosibirsk'" in postgresql.conf

Affected only Windows, not Linux.

Sorry for my english...


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Dmitry Funk <diffor(at)gmail(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 19:00:35
Message-ID: 1274295519-sup-665@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Excerpts from Dmitry Funk's message of mié may 19 13:44:35 -0400 2010:

> Description: Asia/Novosibirsk timezone problem
> Details:
>
> Current system timezone: Asia/Novosibisk
>
> PostgreSQL on query "show timezone" show answer "Asia/Almaty"
>
> Asia/Novosibisk has daylight saving time
> Asia/Almaty NOT has daylight saving time
> and result of now() is wrong
>
> Workaround: "timezone = 'Asia/Novosibirsk'" in postgresql.conf
>
> Affected only Windows, not Linux.

We have this in pgtz.c:

{
"N. Central Asia Standard Time", "N. Central Asia Daylight Time",
"Asia/Almaty"
}, /* (GMT+06:00) Almaty, Novosibirsk */

Which is probably wrong.
--


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Dmitry Funk <diffor(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 19:03:25
Message-ID: AANLkTik6jdOrZqPcThyQk1YTZzuBAubaPC2fwJTEBzQ6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, May 19, 2010 at 3:00 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Excerpts from Dmitry Funk's message of mié may 19 13:44:35 -0400 2010:
>
>> Description:        Asia/Novosibirsk timezone problem
>> Details:
>>
>> Current system timezone: Asia/Novosibisk
>>
>> PostgreSQL on query "show timezone" show answer "Asia/Almaty"
>>
>> Asia/Novosibisk has daylight saving time
>> Asia/Almaty NOT has daylight saving time
>> and result of now() is wrong
>>
>> Workaround: "timezone = 'Asia/Novosibirsk'" in postgresql.conf
>>
>> Affected only Windows, not Linux.
>
> We have this in pgtz.c:
>
>    {
>        "N. Central Asia Standard Time", "N. Central Asia Daylight Time",
>        "Asia/Almaty"
>    },                          /* (GMT+06:00) Almaty, Novosibirsk */
>
> Which is probably wrong.

Why? :-)

Windows makes no difference between Almaty and Novosibirsk in it's
listing. If we pick the Novosibirsk one by default, that will just
break Almaty. There's no real easy way for us to find the difference
between those, since we're just matching on those two strings.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Dmitry Funk <diffor(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 19:12:34
Message-ID: 1274296098-sup-8306@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Excerpts from Magnus Hagander's message of mié may 19 15:03:25 -0400 2010:
> On Wed, May 19, 2010 at 3:00 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > Excerpts from Dmitry Funk's message of mié may 19 13:44:35 -0400 2010:

> >> Current system timezone: Asia/Novosibisk
> >>
> >> PostgreSQL on query "show timezone" show answer "Asia/Almaty"
> >>
> >> Asia/Novosibisk has daylight saving time
> >> Asia/Almaty NOT has daylight saving time
> >> and result of now() is wrong
> >>
> >> Workaround: "timezone = 'Asia/Novosibirsk'" in postgresql.conf
> >>
> >> Affected only Windows, not Linux.
> >
> > We have this in pgtz.c:
> >
> >    {
> >        "N. Central Asia Standard Time", "N. Central Asia Daylight Time",
> >        "Asia/Almaty"
> >    },                          /* (GMT+06:00) Almaty, Novosibirsk */
> >
> > Which is probably wrong.
>
> Why? :-)
>
> Windows makes no difference between Almaty and Novosibirsk in it's
> listing. If we pick the Novosibirsk one by default, that will just
> break Almaty. There's no real easy way for us to find the difference
> between those, since we're just matching on those two strings.

Well, ISTM it does make a difference, which is that there *is* DST info
in the N. Central Asia Standard Time zone, no? According the Dmitry,
Almaty doesn't have DST, so it's wrong to report that zone.

I happened to notice this page:
http://www.chronos-st.org/Windows-to-Olson.html
which also maps "N. Central Asia" to Novosibirsk.
--


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Dmitry Funk <diffor(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 19:17:50
Message-ID: AANLkTimUSySywpzy5AlUAmmeYEWzRbCjx-bcu7PTsWmb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, May 19, 2010 at 3:12 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Excerpts from Magnus Hagander's message of mié may 19 15:03:25 -0400 2010:
>> On Wed, May 19, 2010 at 3:00 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>> > Excerpts from Dmitry Funk's message of mié may 19 13:44:35 -0400 2010:
>
>> >> Current system timezone: Asia/Novosibisk
>> >>
>> >> PostgreSQL on query "show timezone" show answer "Asia/Almaty"
>> >>
>> >> Asia/Novosibisk has daylight saving time
>> >> Asia/Almaty NOT has daylight saving time
>> >> and result of now() is wrong
>> >>
>> >> Workaround: "timezone = 'Asia/Novosibirsk'" in postgresql.conf
>> >>
>> >> Affected only Windows, not Linux.
>> >
>> > We have this in pgtz.c:
>> >
>> >    {
>> >        "N. Central Asia Standard Time", "N. Central Asia Daylight Time",
>> >        "Asia/Almaty"
>> >    },                          /* (GMT+06:00) Almaty, Novosibirsk */
>> >
>> > Which is probably wrong.
>>
>> Why? :-)
>>
>> Windows makes no difference between Almaty and Novosibirsk in it's
>> listing. If we pick the Novosibirsk one by default, that will just
>> break Almaty. There's no real easy way for us to find the difference
>> between those, since we're just matching on those two strings.
>
> Well, ISTM it does make a difference, which is that there *is* DST info
> in the N. Central Asia Standard Time zone, no?  According the Dmitry,
> Almaty doesn't have DST, so it's wrong to report that zone.

Well, if we report it as Novosibirsk, it will have DST. Which users in
Almaty aren't supposed to have, so it'll be wrong for them. So it's
going to be wrong for one of them whichever way we go, won't it?

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Dmitry Funk <diffor(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 19:23:15
Message-ID: 1274296907-sup-7046@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Excerpts from Magnus Hagander's message of mié may 19 15:17:50 -0400 2010:
>
> > Well, ISTM it does make a difference, which is that there *is* DST info
> > in the N. Central Asia Standard Time zone, no?  According the Dmitry,
> > Almaty doesn't have DST, so it's wrong to report that zone.
>
> Well, if we report it as Novosibirsk, it will have DST. Which users in
> Almaty aren't supposed to have, so it'll be wrong for them. So it's
> going to be wrong for one of them whichever way we go, won't it?

I meant that the Windows timezone does have DST, so users in Almaty are
already screwed, but by Microsoft, not us.
--


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Dmitry Funk <diffor(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-19 20:19:45
Message-ID: 24190.1274300385@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Excerpts from Magnus Hagander's message of mi may 19 15:17:50 -0400 2010:
>> Well, if we report it as Novosibirsk, it will have DST. Which users in
>> Almaty aren't supposed to have, so it'll be wrong for them. So it's
>> going to be wrong for one of them whichever way we go, won't it?

> I meant that the Windows timezone does have DST, so users in Almaty are
> already screwed, but by Microsoft, not us.

According to the zic entry, Almaty has observed DST for most of the
zone's history. It might well choose to do so again someday. So we
should not imagine that "no DST" is an essential aspect of that zone.

AFAICS we don't really have any way to choose what to do here other
than making the default work for whichever zone is more populous.
Anyone know?

regards, tom lane


From: Diffor <diffor(at)gmail(dot)com>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-20 07:54:39
Message-ID: AANLkTikkfxHIjaXyygXd-EJu1v6i2Ucv7lvBfWAOJ6Fc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

December 2009 cumulative time zone update for Microsoft Windows operating
systems:
http://support.microsoft.com/?kbid=976098

pgtz.c is outdated:
>N. Central Asia Standard Time:
>Removes “Almaty” from the “(GMT+06:00) Almaty, Novosibirsk” time zone.


From: Diffor <diffor(at)gmail(dot)com>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-20 12:12:59
Message-ID: AANLkTilpbzpwpvCUUAVFQMC5PSD0N3SJRSoQ7ne6F0zl@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

2010/5/20 Diffor <diffor(at)gmail(dot)com>

> December 2009 cumulative time zone update for Microsoft Windows operating
> systems:
> http://support.microsoft.com/?kbid=976098
>
> pgtz.c is outdated:
> >N. Central Asia Standard Time:
> >Removes “Almaty” from the “(GMT+06:00) Almaty, Novosibirsk” time zone.
>

I contact people from Astana. Windows users from Almaty use "(GMT+06:00)
Astana" time zone (Central Asia Standard Time). This city have no DST and in
same country (KZ).

IMHO need patch src/timezone/pgtz.c :
892c892
< "Asia/Almaty"
---
> "Asia/Novosibirsk"


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Diffor <diffor(at)gmail(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5466: Asia/Novosibirsk timezone problem
Date: 2010-05-20 14:13:08
Message-ID: AANLkTineX4Tvq0r0YQbIIKCb64jm33uANdnKfm7mErxR@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Ah, good reference - thanks for digging that up. Interstingly enough
they seem to have just removed Almaty - and not put it anywhere else
:-)

But as someone said, they're being screwed, but only by MS, not us.

I've applied the change to pgtz.c. It will be in the next releases.

//Magnus

On Thu, May 20, 2010 at 3:54 AM, Diffor <diffor(at)gmail(dot)com> wrote:
> December 2009 cumulative time zone update for Microsoft Windows operating systems:
> http://support.microsoft.com/?kbid=976098
>
> pgtz.c is outdated:
>>N. Central Asia Standard Time:
>>Removes “Almaty” from the “(GMT+06:00) Almaty, Novosibirsk” time zone.
>

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/