Last active
August 29, 2015 14:12
-
-
Save fire/2a52b0aced9e780675de to your computer and use it in GitHub Desktop.
Postgresql and system tzdata weirdness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Daylight saving time for timestamps beyond 32-bit time_t range. | |
SELECT '20500710 173201 Europe/Helsinki'::timestamptz; -- DST | |
timestamptz | |
------------------------------ | |
Sun Jul 10 07:32:01 2050 PDT | |
(1 row) | |
SELECT '20500110 173201 Europe/Helsinki'::timestamptz; -- non-DST | |
timestamptz | |
------------------------------ | |
Mon Jan 10 07:32:01 2050 PST | |
(1 row) | |
SELECT '205000-07-10 17:32:01 Europe/Helsinki'::timestamptz; -- DST | |
timestamptz | |
-------------------------------- | |
Thu Jul 10 07:32:01 205000 PDT | |
(1 row) | |
SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz; -- non-DST | |
timestamptz | |
-------------------------------- | |
Fri Jan 10 07:32:01 205000 PST | |
(1 row) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Daylight saving time for timestamps beyond 32-bit time_t range. | |
SELECT '20500710 173201 Europe/Helsinki'::timestamptz; -- DST | |
timestamptz | |
------------------------------ | |
Sun Jul 10 07:32:01 2050 PST | |
(1 row) | |
SELECT '20500110 173201 Europe/Helsinki'::timestamptz; -- non-DST | |
timestamptz | |
------------------------------ | |
Mon Jan 10 07:32:01 2050 PST | |
(1 row) | |
SELECT '205000-07-10 17:32:01 Europe/Helsinki'::timestamptz; -- DST | |
timestamptz | |
-------------------------------- | |
Thu Jul 10 07:32:01 205000 PST | |
(1 row) | |
SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz; -- non-DST | |
timestamptz | |
-------------------------------- | |
Fri Jan 10 07:32:01 205000 PST | |
(1 row) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment