Subject: timezones BCE

From: Dave Cramer <[email-masked]>
Date: Wed, 13 Apr 2022 12:33:01 -0400

Can someone help me understand

select '0101-01-01'::timestamptz;
      timestamptz
------------------------
 0101-01-01 00:00:00+00
(1 row)

test=# set timezone to 'America/Toronto';
SET
test=# select '0101-01-01'::timestamptz;
         timestamptz
------------------------------
 0101-01-01 00:00:00-05:17:32
(1 row)

select 'now()'::timestamptz;
          timestamptz
-------------------------------
 2022-04-13 12:31:57.271967-04
(1 row)

Specifically why the -05:17:32

Dave Cramer

---

From: [email-masked]
Date: Wed, 13 Apr 2022 12:48:10 -0400

> test=# select '0101-01-01'::timestamptz;

Timezones were regularized into their (typically hour-wide) chunks
during a period around the late nineteenth century IIRC.

If you decompile the zoneinfo database to look at America/Toronto,
you will probably find an entry for dates earlier than when the
regularized zones were established there, and that entry will have
an offset reflecting Toronto's actual longitude.

Regards,
-Chap