Matplotlib X-axis timezone trouble

Chris Angelico rosuav at gmail.com
Tue Jun 30 03:01:15 EDT 2015


On Tue, Jun 30, 2015 at 2:49 PM, Peter Pearson
<pkpearson at nowhere.invalid> wrote:
> Time zones teem with sneaky software problems, and so does daylight-saving
> time, so this problem might strain my brain.  Maybe it's going to turn
> out that my expectations are unreasonable . . . as in, "Well, smarty pants,
> how do you want the axis labelled when the abscissas straddle the
> beginning of daylight-saving time?"  I'll research and digest.

That's entirely possible. Even more so if you go across some other
civil time change - if you look at the history of timezones in tzdata,
there's no end of messes as different places adopted standard time,
redefined standard time, and unified with someone else's standard
time. And some of that happened relatively recently.

UTC is much easier for this kind of thing. Especially if the
granularity of your data lets you ignore leap seconds.

ChrisA



More information about the Python-list mailing list