US/Eastern offset

Skip Montanaro skip.montanaro at gmail.com
Thu Dec 22 15:49:28 EST 2016


In a small application I realized I needed all my timestamps to have
timezone info. Some timestamp strings come in with no TZ markings, but
I know they are US/Eastern. so, I built one:

>>> import pytz
>>> tz = pytz.timezone("US/Eastern")
>>> tz
<DstTzInfo 'US/Eastern' LMT-1 day, 19:04:00 STD>

What's with those extra four minutes? Here is one such timestamp I
logged in my app:

    2016-12-22T20:35:05-04:56

WTF? Has my brain turned to mush, and the people in New York now move
so fast that they are four minutes closer to their London counterparts
than they used to be?

Thx,

Skip



More information about the Python-list mailing list