From: eshkinkot@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6605: wrong type cast from timestamp to timestamptz
Date: Sat, 21 Apr 2012 07:11:50 +0000
Message-ID: <E1SLUU2-0004nB-1c@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6605
Logged by: Sergey Burladyan
Email address: eshkinkot@gmail.com
PostgreSQL version: 9.1.3
Operating system: Debian testing
Description:
Postgres from Debian package:
PostgreSQL 9.1.3 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
4.6.3-1) 4.6.3, 64-bit
Good:
set timezone to 'Europe/Moscow'; select '2011-03-27
23:00:00'::timestamptz;
SET
Время: 0,092 мс
timestamptz
------------------------
2011-03-27 23:00:00+04
Bad:
set timezone to 'W-SU'; select '2011-03-27 23:00:00'::timestamptz;
SET
Время: 0,106 мс
timestamptz
------------------------
2011-03-28 02:59:54+04
Good again:
set timezone to 'W-SU'; select '2011-03-27 23:00:01'::timestamptz;
SET
Время: 0,135 мс
timestamptz
------------------------
2011-03-27 23:00:01+04
For information, 2011-03-27 the last day when Daylight Saving Time was used.
After it Daylight Saving Time is canceled in Russia:
W-SU is symlink:
$ ls -la /usr/share/zoneinfo/Europe/Moscow
lrwxrwxrwx 1 root root 7 Мар 6 22:39 /usr/share/zoneinfo/Europe/Moscow ->
../W-SU
$ zdump -v W-SU | tail
W-SU Sat Oct 24 22:59:59 2009 UTC = Sun Oct 25 02:59:59 2009 MSD isdst=1
gmtoff=14400
W-SU Sat Oct 24 23:00:00 2009 UTC = Sun Oct 25 02:00:00 2009 MSK isdst=0
gmtoff=10800
W-SU Sat Mar 27 22:59:59 2010 UTC = Sun Mar 28 01:59:59 2010 MSK isdst=0
gmtoff=10800
W-SU Sat Mar 27 23:00:00 2010 UTC = Sun Mar 28 03:00:00 2010 MSD isdst=1
gmtoff=14400
W-SU Sat Oct 30 22:59:59 2010 UTC = Sun Oct 31 02:59:59 2010 MSD isdst=1
gmtoff=14400
W-SU Sat Oct 30 23:00:00 2010 UTC = Sun Oct 31 02:00:00 2010 MSK isdst=0
gmtoff=10800
W-SU Sat Mar 26 22:59:59 2011 UTC = Sun Mar 27 01:59:59 2011 MSK isdst=0
gmtoff=10800
W-SU Sat Mar 26 23:00:00 2011 UTC = Sun Mar 27 03:00:00 2011 MSK isdst=0
gmtoff=14400
W-SU 9223372036854689407 = NULL
W-SU 9223372036854775807 = NULL
I also see this problem in my other server with 9.0:
select '2011-03-27 23:00:00'::timestamptz;
timestamptz
------------------------
2068-04-02 03:00:00+04
(1 row)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: eshkinkot@gmail.com
Subject: Re: BUG #6605: wrong type cast from timestamp to timestamptz
In-Reply-To: <E1SLUU2-0004nB-1c@wrigleys.postgresql.org>
References: <E1SLUU2-0004nB-1c@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox