Matplotlib X-axis timezone trouble

Peter Pearson pkpearson at nowhere.invalid
Fri Jul 10 12:15:58 EDT 2015


On Thu, 09 Jul 2015 19:50:33 GMT, Tony the Tiger <tony at tiger.invalid> wrote:
> On Tue, 30 Jun 2015 00:56:26 +0000, Peter Pearson wrote:
>
>> If I use timezone US/Central, I get the same (bad) plot.
>
> Perhaps this can help?:
> http://stackoverflow.com/questions/1301493/setting-timezone-in-python

Yes, thanks.  As I summarized (in greater detail) elsewhere on this
thread, Matplotlib was entirely innocent, and was correctly labeling
erroneous datetime objects.  My real problem was that datetime.datetime()
malfunctions when its tzinfo parameter is a timezone with daylight
saving time.  The practical solution is to use pytz.localize().

-- 
To email me, substitute nowhere->runbox, invalid->com.



More information about the Python-list mailing list