From: Tom Lane Date: Wed, 19 Nov 2014 02:36:43 +0000 (-0500) Subject: Don't require bleeding-edge timezone data in timestamptz regression test. X-Git-Tag: REL9_4_0~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1ab2fa823692e13b2302ba2959f297acb4f1758;p=postgresql Don't require bleeding-edge timezone data in timestamptz regression test. The regression test cases added in commits b2cbced9e et al depended in part on the Russian timezone offset changes of Oct 2014. While this is of no particular concern for a default Postgres build, it was possible for a build using --with-system-tzdata to fail the tests if the system tzdata database wasn't au courant. Bjorn Munch and Christoph Berg both complained about this while packaging 9.4rc1, so we probably shouldn't insist on the system tzdata being up-to-date. Instead, make an equivalent test using a zone change that occurred in Venezuela in 2007. With this patch, the regression tests should pass using any tzdata set from 2012 or later. (I can't muster much sympathy for somebody using --with-system-tzdata on a machine whose system tzdata is more than three years out-of-date.) --- diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out index 552f3d1aa5..e5a21305c0 100644 --- a/src/test/regress/expected/timestamptz.out +++ b/src/test/regress/expected/timestamptz.out @@ -1808,7 +1808,8 @@ RESET TimeZone; -- -- Test behavior with a dynamic (time-varying) timezone abbreviation. -- These tests rely on the knowledge that MSK (Europe/Moscow standard time) --- changed meaning in Mar 2011 and back again in Oct 2014. +-- moved forwards in Mar 2011 and that VET (America/Caracas standard time) +-- moved backwards in Dec 2007. -- SET TimeZone to 'UTC'; SELECT '2011-03-27 00:00:00 Europe/Moscow'::timestamptz; @@ -1919,100 +1920,100 @@ SELECT '2011-03-27 04:00:00 MSK'::timestamptz; Sun Mar 27 00:00:00 2011 UTC (1 row) -SELECT '2014-10-26 00:00:00 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 02:00:00 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 20:00:00 2014 UTC + Sun Dec 09 06:00:00 2007 UTC (1 row) -SELECT '2014-10-26 00:59:59 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 02:29:59 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 20:59:59 2014 UTC + Sun Dec 09 06:29:59 2007 UTC (1 row) -SELECT '2014-10-26 01:00:00 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 02:30:00 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:00:00 2014 UTC + Sun Dec 09 07:00:00 2007 UTC (1 row) -SELECT '2014-10-26 01:00:01 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 02:30:01 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:00:01 2014 UTC + Sun Dec 09 07:00:01 2007 UTC (1 row) -SELECT '2014-10-26 01:59:59 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 02:59:59 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:59:59 2014 UTC + Sun Dec 09 07:29:59 2007 UTC (1 row) -SELECT '2014-10-26 02:00:00 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 03:00:00 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 23:00:00 2014 UTC + Sun Dec 09 07:30:00 2007 UTC (1 row) -SELECT '2014-10-26 02:00:01 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 03:00:01 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 23:00:01 2014 UTC + Sun Dec 09 07:30:01 2007 UTC (1 row) -SELECT '2014-10-26 03:00:00 Europe/Moscow'::timestamptz; +SELECT '2007-12-09 04:00:00 America/Caracas'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 00:00:00 2014 UTC + Sun Dec 09 08:30:00 2007 UTC (1 row) -SELECT '2014-10-26 00:00:00 MSK'::timestamptz; +SELECT '2007-12-09 02:00:00 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 20:00:00 2014 UTC + Sun Dec 09 06:00:00 2007 UTC (1 row) -SELECT '2014-10-26 00:59:59 MSK'::timestamptz; +SELECT '2007-12-09 02:29:59 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 20:59:59 2014 UTC + Sun Dec 09 06:29:59 2007 UTC (1 row) -SELECT '2014-10-26 01:00:00 MSK'::timestamptz; +SELECT '2007-12-09 02:30:00 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:00:00 2014 UTC + Sun Dec 09 07:00:00 2007 UTC (1 row) -SELECT '2014-10-26 01:00:01 MSK'::timestamptz; +SELECT '2007-12-09 02:30:01 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:00:01 2014 UTC + Sun Dec 09 07:00:01 2007 UTC (1 row) -SELECT '2014-10-26 01:59:59 MSK'::timestamptz; +SELECT '2007-12-09 02:59:59 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 22:59:59 2014 UTC + Sun Dec 09 07:29:59 2007 UTC (1 row) -SELECT '2014-10-26 02:00:00 MSK'::timestamptz; +SELECT '2007-12-09 03:00:00 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 23:00:00 2014 UTC + Sun Dec 09 07:30:00 2007 UTC (1 row) -SELECT '2014-10-26 02:00:01 MSK'::timestamptz; +SELECT '2007-12-09 03:00:01 VET'::timestamptz; timestamptz ------------------------------ - Sat Oct 25 23:00:01 2014 UTC + Sun Dec 09 07:30:01 2007 UTC (1 row) -SELECT '2014-10-26 03:00:00 MSK'::timestamptz; +SELECT '2007-12-09 04:00:00 VET'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 00:00:00 2014 UTC + Sun Dec 09 08:30:00 2007 UTC (1 row) SELECT '2011-03-27 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; @@ -2123,112 +2124,112 @@ SELECT '2011-03-27 04:00:00'::timestamp AT TIME ZONE 'MSK'; Sun Mar 27 00:00:00 2011 UTC (1 row) -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 02:00:00'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 20:00:00 2014 UTC + Sun Dec 09 06:00:00 2007 UTC (1 row) -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 02:29:59'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 20:59:59 2014 UTC + Sun Dec 09 06:29:59 2007 UTC (1 row) -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 02:30:00'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 22:00:00 2014 UTC + Sun Dec 09 07:00:00 2007 UTC (1 row) -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 02:30:01'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 22:00:01 2014 UTC + Sun Dec 09 07:00:01 2007 UTC (1 row) -SELECT '2014-10-26 01:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 02:59:59'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 22:59:59 2014 UTC + Sun Dec 09 07:29:59 2007 UTC (1 row) -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 03:00:00'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 23:00:00 2014 UTC + Sun Dec 09 07:30:00 2007 UTC (1 row) -SELECT '2014-10-26 02:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 03:00:01'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sat Oct 25 23:00:01 2014 UTC + Sun Dec 09 07:30:01 2007 UTC (1 row) -SELECT '2014-10-26 03:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 04:00:00'::timestamp AT TIME ZONE 'America/Caracas'; timezone ------------------------------ - Sun Oct 26 00:00:00 2014 UTC + Sun Dec 09 08:30:00 2007 UTC (1 row) -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 02:00:00'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 20:00:00 2014 UTC + Sun Dec 09 06:00:00 2007 UTC (1 row) -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 02:29:59'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 20:59:59 2014 UTC + Sun Dec 09 06:29:59 2007 UTC (1 row) -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 02:30:00'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 22:00:00 2014 UTC + Sun Dec 09 07:00:00 2007 UTC (1 row) -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 02:30:01'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 22:00:01 2014 UTC + Sun Dec 09 07:00:01 2007 UTC (1 row) -SELECT '2014-10-26 01:59:59'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 02:59:59'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 22:59:59 2014 UTC + Sun Dec 09 07:29:59 2007 UTC (1 row) -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 03:00:00'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 23:00:00 2014 UTC + Sun Dec 09 07:30:00 2007 UTC (1 row) -SELECT '2014-10-26 02:00:01'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 03:00:01'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sat Oct 25 23:00:01 2014 UTC + Sun Dec 09 07:30:01 2007 UTC (1 row) -SELECT '2014-10-26 03:00:00'::timestamp AT TIME ZONE 'MSK'; +SELECT '2007-12-09 04:00:00'::timestamp AT TIME ZONE 'VET'; timezone ------------------------------ - Sun Oct 26 00:00:00 2014 UTC + Sun Dec 09 08:30:00 2007 UTC (1 row) -SELECT make_timestamptz(2014, 10, 26, 0, 0, 0, 'MSK'); +SELECT make_timestamptz(2007, 12, 9, 2, 0, 0, 'VET'); make_timestamptz ------------------------------ - Sat Oct 25 20:00:00 2014 UTC + Sun Dec 09 06:00:00 2007 UTC (1 row) -SELECT make_timestamptz(2014, 10, 26, 3, 0, 0, 'MSK'); +SELECT make_timestamptz(2007, 12, 9, 3, 0, 0, 'VET'); make_timestamptz ------------------------------ - Sun Oct 26 00:00:00 2014 UTC + Sun Dec 09 07:30:00 2007 UTC (1 row) SET TimeZone to 'Europe/Moscow'; @@ -2274,46 +2275,47 @@ SELECT '2011-03-27 00:00:00 UTC'::timestamptz; Sun Mar 27 04:00:00 2011 MSK (1 row) -SELECT '2014-10-25 20:00:00 UTC'::timestamptz; +SET TimeZone to 'America/Caracas'; +SELECT '2007-12-09 06:00:00 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 00:00:00 2014 MSK + Sun Dec 09 02:00:00 2007 VET (1 row) -SELECT '2014-10-25 21:00:00 UTC'::timestamptz; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 01:00:00 2014 MSK + Sun Dec 09 02:30:00 2007 VET (1 row) -SELECT '2014-10-25 21:59:59 UTC'::timestamptz; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 01:59:59 2014 MSK + Sun Dec 09 02:59:59 2007 VET (1 row) -SELECT '2014-10-25 22:00:00 UTC'::timestamptz; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 01:00:00 2014 MSK + Sun Dec 09 02:30:00 2007 VET (1 row) -SELECT '2014-10-25 22:00:01 UTC'::timestamptz; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 01:00:01 2014 MSK + Sun Dec 09 02:30:01 2007 VET (1 row) -SELECT '2014-10-25 22:59:59 UTC'::timestamptz; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 01:59:59 2014 MSK + Sun Dec 09 02:59:59 2007 VET (1 row) -SELECT '2014-10-25 23:00:00 UTC'::timestamptz; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz; timestamptz ------------------------------ - Sun Oct 26 02:00:00 2014 MSK + Sun Dec 09 03:00:00 2007 VET (1 row) RESET TimeZone; @@ -2359,46 +2361,46 @@ SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; Sun Mar 27 04:00:00 2011 (1 row) -SELECT '2014-10-25 20:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 06:00:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 00:00:00 2014 + Sun Dec 09 02:00:00 2007 (1 row) -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 01:00:00 2014 + Sun Dec 09 02:30:00 2007 (1 row) -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 01:59:59 2014 + Sun Dec 09 02:59:59 2007 (1 row) -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 01:00:00 2014 + Sun Dec 09 02:30:00 2007 (1 row) -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 01:00:01 2014 + Sun Dec 09 02:30:01 2007 (1 row) -SELECT '2014-10-25 22:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 01:59:59 2014 + Sun Dec 09 02:59:59 2007 (1 row) -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; timezone -------------------------- - Sun Oct 26 02:00:00 2014 + Sun Dec 09 03:00:00 2007 (1 row) SELECT '2011-03-26 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; @@ -2443,45 +2445,45 @@ SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; Sun Mar 27 04:00:00 2011 (1 row) -SELECT '2014-10-25 20:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 06:00:00 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 00:00:00 2014 + Sun Dec 09 02:00:00 2007 (1 row) -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 01:00:00 2014 + Sun Dec 09 02:30:00 2007 (1 row) -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 01:59:59 2014 + Sun Dec 09 02:59:59 2007 (1 row) -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 01:00:00 2014 + Sun Dec 09 02:30:00 2007 (1 row) -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 01:00:01 2014 + Sun Dec 09 02:30:01 2007 (1 row) -SELECT '2014-10-25 22:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 01:59:59 2014 + Sun Dec 09 02:59:59 2007 (1 row) -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz AT TIME ZONE 'VET'; timezone -------------------------- - Sun Oct 26 02:00:00 2014 + Sun Dec 09 03:00:00 2007 (1 row) diff --git a/src/test/regress/sql/timestamptz.sql b/src/test/regress/sql/timestamptz.sql index 92b5bbc1ba..f4b455e703 100644 --- a/src/test/regress/sql/timestamptz.sql +++ b/src/test/regress/sql/timestamptz.sql @@ -294,7 +294,8 @@ RESET TimeZone; -- -- Test behavior with a dynamic (time-varying) timezone abbreviation. -- These tests rely on the knowledge that MSK (Europe/Moscow standard time) --- changed meaning in Mar 2011 and back again in Oct 2014. +-- moved forwards in Mar 2011 and that VET (America/Caracas standard time) +-- moved backwards in Dec 2007. -- SET TimeZone to 'UTC'; @@ -319,23 +320,23 @@ SELECT '2011-03-27 03:00:00 MSK'::timestamptz; SELECT '2011-03-27 03:00:01 MSK'::timestamptz; SELECT '2011-03-27 04:00:00 MSK'::timestamptz; -SELECT '2014-10-26 00:00:00 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 00:59:59 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 01:00:00 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 01:00:01 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 01:59:59 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 02:00:00 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 02:00:01 Europe/Moscow'::timestamptz; -SELECT '2014-10-26 03:00:00 Europe/Moscow'::timestamptz; - -SELECT '2014-10-26 00:00:00 MSK'::timestamptz; -SELECT '2014-10-26 00:59:59 MSK'::timestamptz; -SELECT '2014-10-26 01:00:00 MSK'::timestamptz; -SELECT '2014-10-26 01:00:01 MSK'::timestamptz; -SELECT '2014-10-26 01:59:59 MSK'::timestamptz; -SELECT '2014-10-26 02:00:00 MSK'::timestamptz; -SELECT '2014-10-26 02:00:01 MSK'::timestamptz; -SELECT '2014-10-26 03:00:00 MSK'::timestamptz; +SELECT '2007-12-09 02:00:00 America/Caracas'::timestamptz; +SELECT '2007-12-09 02:29:59 America/Caracas'::timestamptz; +SELECT '2007-12-09 02:30:00 America/Caracas'::timestamptz; +SELECT '2007-12-09 02:30:01 America/Caracas'::timestamptz; +SELECT '2007-12-09 02:59:59 America/Caracas'::timestamptz; +SELECT '2007-12-09 03:00:00 America/Caracas'::timestamptz; +SELECT '2007-12-09 03:00:01 America/Caracas'::timestamptz; +SELECT '2007-12-09 04:00:00 America/Caracas'::timestamptz; + +SELECT '2007-12-09 02:00:00 VET'::timestamptz; +SELECT '2007-12-09 02:29:59 VET'::timestamptz; +SELECT '2007-12-09 02:30:00 VET'::timestamptz; +SELECT '2007-12-09 02:30:01 VET'::timestamptz; +SELECT '2007-12-09 02:59:59 VET'::timestamptz; +SELECT '2007-12-09 03:00:00 VET'::timestamptz; +SELECT '2007-12-09 03:00:01 VET'::timestamptz; +SELECT '2007-12-09 04:00:00 VET'::timestamptz; SELECT '2011-03-27 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; SELECT '2011-03-27 01:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; @@ -357,26 +358,26 @@ SELECT '2011-03-27 03:00:00'::timestamp AT TIME ZONE 'MSK'; SELECT '2011-03-27 03:00:01'::timestamp AT TIME ZONE 'MSK'; SELECT '2011-03-27 04:00:00'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 01:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 02:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-26 03:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 01:59:59'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 02:00:01'::timestamp AT TIME ZONE 'MSK'; -SELECT '2014-10-26 03:00:00'::timestamp AT TIME ZONE 'MSK'; - -SELECT make_timestamptz(2014, 10, 26, 0, 0, 0, 'MSK'); -SELECT make_timestamptz(2014, 10, 26, 3, 0, 0, 'MSK'); +SELECT '2007-12-09 02:00:00'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 02:29:59'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 02:30:00'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 02:30:01'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 02:59:59'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 03:00:00'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 03:00:01'::timestamp AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 04:00:00'::timestamp AT TIME ZONE 'America/Caracas'; + +SELECT '2007-12-09 02:00:00'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 02:29:59'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 02:30:00'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 02:30:01'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 02:59:59'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 03:00:00'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 03:00:01'::timestamp AT TIME ZONE 'VET'; +SELECT '2007-12-09 04:00:00'::timestamp AT TIME ZONE 'VET'; + +SELECT make_timestamptz(2007, 12, 9, 2, 0, 0, 'VET'); +SELECT make_timestamptz(2007, 12, 9, 3, 0, 0, 'VET'); SET TimeZone to 'Europe/Moscow'; @@ -388,13 +389,15 @@ SELECT '2011-03-26 23:00:01 UTC'::timestamptz; SELECT '2011-03-26 23:59:59 UTC'::timestamptz; SELECT '2011-03-27 00:00:00 UTC'::timestamptz; -SELECT '2014-10-25 20:00:00 UTC'::timestamptz; -SELECT '2014-10-25 21:00:00 UTC'::timestamptz; -SELECT '2014-10-25 21:59:59 UTC'::timestamptz; -SELECT '2014-10-25 22:00:00 UTC'::timestamptz; -SELECT '2014-10-25 22:00:01 UTC'::timestamptz; -SELECT '2014-10-25 22:59:59 UTC'::timestamptz; -SELECT '2014-10-25 23:00:00 UTC'::timestamptz; +SET TimeZone to 'America/Caracas'; + +SELECT '2007-12-09 06:00:00 UTC'::timestamptz; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz; RESET TimeZone; @@ -406,13 +409,13 @@ SELECT '2011-03-26 23:00:01 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; SELECT '2011-03-26 23:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 20:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 22:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; +SELECT '2007-12-09 06:00:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz AT TIME ZONE 'America/Caracas'; SELECT '2011-03-26 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; SELECT '2011-03-26 22:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; @@ -422,10 +425,10 @@ SELECT '2011-03-26 23:00:01 UTC'::timestamptz AT TIME ZONE 'MSK'; SELECT '2011-03-26 23:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 20:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 22:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; +SELECT '2007-12-09 06:00:00 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 06:30:00 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 06:59:59 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 07:00:00 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 07:00:01 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 07:29:59 UTC'::timestamptz AT TIME ZONE 'VET'; +SELECT '2007-12-09 07:30:00 UTC'::timestamptz AT TIME ZONE 'VET';