BUG #5466: Asia/Novosibirsk timezone problem

Started by Difforalmost 16 years ago10 messagesbugs
Jump to latest
#1Diffor
diffor@gmail.com

The following bug has been logged online:

Bug reference: 5466
Logged by: Dmitry Funk
Email address: diffor@gmail.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...

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Diffor (#1)
Re: BUG #5466: Asia/Novosibirsk timezone problem

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.
--

#3Magnus Hagander
magnus@hagander.net
In reply to: Alvaro Herrera (#2)
Re: BUG #5466: Asia/Novosibirsk timezone problem

On Wed, May 19, 2010 at 3:00 PM, Alvaro Herrera <alvherre@alvh.no-ip.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/

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Magnus Hagander (#3)
Re: BUG #5466: Asia/Novosibirsk timezone problem

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@alvh.no-ip.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.
--

#5Magnus Hagander
magnus@hagander.net
In reply to: Alvaro Herrera (#4)
Re: BUG #5466: Asia/Novosibirsk timezone problem

On Wed, May 19, 2010 at 3:12 PM, Alvaro Herrera <alvherre@alvh.no-ip.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@alvh.no-ip.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/

#6Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Magnus Hagander (#5)
Re: BUG #5466: Asia/Novosibirsk timezone problem

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.
--

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#6)
Re: BUG #5466: Asia/Novosibirsk timezone problem

Alvaro Herrera <alvherre@alvh.no-ip.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

#8Diffor
diffor@gmail.com
In reply to: Tom Lane (#7)
Re: BUG #5466: Asia/Novosibirsk timezone problem

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

pgtz.c is outdated:

Show quoted text

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

#9Diffor
diffor@gmail.com
In reply to: Diffor (#8)
Re: BUG #5466: Asia/Novosibirsk timezone problem

2010/5/20 Diffor <diffor@gmail.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"
---

Show quoted text

"Asia/Novosibirsk"

#10Magnus Hagander
magnus@hagander.net
In reply to: Diffor (#8)
Re: BUG #5466: Asia/Novosibirsk timezone problem

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@gmail.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/