What the Royal Astronomical Society in 1884 Tells Us About Python Today

What the Royal Astronomical Society in 1884 Tells Us About Python Today

To support this functionality, pytz constructs objects (Python’s weak abstraction for time zones) that load the definitions from the standard IANA time zone database, tzdb. You can see the assignment of this offset to the time zone in the IANA tzdb here:

The last line above says that the offset for this zone is -4h 56m 02s, called the “local mean time” (LMT), up until 1883 Nov 18 12:03:58, which is the NYC local time of when GMT was standardized by US railways (though not yet officially by the federal government). The same thing it does when you construct a localized in pytz’s preferred, albeit non-standard, way: use the local datetime as an index into the tzdb zone definition.

Source: typesandtimes.net