BUG #6605: wrong type cast from timestamp to timestamptz
От | eshkinkot@gmail.com |
---|---|
Тема | BUG #6605: wrong type cast from timestamp to timestamptz |
Дата | |
Msg-id | E1SLUU2-0004nB-1c@wrigleys.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #6605: wrong type cast from timestamp to timestamptz
Re: BUG #6605: wrong type cast from timestamp to timestamptz |
Список | pgsql-bugs |
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:=20=20=20=20=20=20=20=20 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 =D0=92=D1=80=D0=B5=D0=BC=D1=8F: 0,092 =D0=BC=D1=81 timestamptz=20=20=20=20=20=20=20 ------------------------ 2011-03-27 23:00:00+04 Bad: set timezone to 'W-SU'; select '2011-03-27 23:00:00'::timestamptz; SET =D0=92=D1=80=D0=B5=D0=BC=D1=8F: 0,106 =D0=BC=D1=81 timestamptz=20=20=20=20=20=20=20 ------------------------ 2011-03-28 02:59:54+04 Good again: set timezone to 'W-SU'; select '2011-03-27 23:00:01'::timestamptz; SET =D0=92=D1=80=D0=B5=D0=BC=D1=8F: 0,135 =D0=BC=D1=81 timestamptz=20=20=20=20=20=20=20 ------------------------ 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=20 lrwxrwxrwx 1 root root 7 =D0=9C=D0=B0=D1=80 6 22:39 /usr/share/zoneinfo/Eu= rope/Moscow -> ../W-SU $ zdump -v W-SU | tail W-SU Sat Oct 24 22:59:59 2009 UTC =3D Sun Oct 25 02:59:59 2009 MSD isdst= =3D1 gmtoff=3D14400 W-SU Sat Oct 24 23:00:00 2009 UTC =3D Sun Oct 25 02:00:00 2009 MSK isdst= =3D0 gmtoff=3D10800 W-SU Sat Mar 27 22:59:59 2010 UTC =3D Sun Mar 28 01:59:59 2010 MSK isdst= =3D0 gmtoff=3D10800 W-SU Sat Mar 27 23:00:00 2010 UTC =3D Sun Mar 28 03:00:00 2010 MSD isdst= =3D1 gmtoff=3D14400 W-SU Sat Oct 30 22:59:59 2010 UTC =3D Sun Oct 31 02:59:59 2010 MSD isdst= =3D1 gmtoff=3D14400 W-SU Sat Oct 30 23:00:00 2010 UTC =3D Sun Oct 31 02:00:00 2010 MSK isdst= =3D0 gmtoff=3D10800 W-SU Sat Mar 26 22:59:59 2011 UTC =3D Sun Mar 27 01:59:59 2011 MSK isdst= =3D0 gmtoff=3D10800 W-SU Sat Mar 26 23:00:00 2011 UTC =3D Sun Mar 27 03:00:00 2011 MSK isdst= =3D0 gmtoff=3D14400 W-SU 9223372036854689407 =3D NULL W-SU 9223372036854775807 =3D NULL I also see this problem in my other server with 9.0: select '2011-03-27 23:00:00'::timestamptz; timestamptz=20=20=20=20=20=20=20 ------------------------ 2068-04-02 03:00:00+04 (1 row)
В списке pgsql-bugs по дате отправления: