David Fetter <da...@fetter.org> writes:
> I'm not sure whether this is a bug or an infelicity we document, but
> at least in some parts of the world, this calculation doesn't comport
> with the calendar in place at the time:
> SELECT to_timestamp('1753', 'YYYY') - to_timestamp('1752', 'YYYY');

Yeah, Appendix B.6 mentions that.

What isn't documented, and maybe should be, is the weird results
you get from the tzdata info for years before standardized time
zones came into use.

regression=# show timezone;
     TimeZone     
------------------
 America/New_York
(1 row)

regression=# select '2020-01-01 00:00'::timestamptz;
      timestamptz       
------------------------
 2020-01-01 00:00:00-05
(1 row)

regression=# select '1800-01-01 00:00'::timestamptz;
         timestamptz          
------------------------------
 1800-01-01 00:00:00-04:56:02
(1 row)

If you're wondering where the heck that came from, it corresponds
to the actual longitude of New York City, i.e. local mean solar time.

                        regards, tom lane


Reply via email to