A Day Has Only 24±1 Hours: import pytz

Loading

Upvotes: DownVotes:
Age: a year     Page Views: 186
Votes / View: 11    Wilson Score: 0.34




On the last Sunday of October “we get one more hour of sleep” but mayspend much more time debugging code dealing with the timezones, daylightsaving time shifts and datetime stuff in general.We'll look at a few pitfalls you may encounter when working withdatetimes in Python. We'll discover the ``pytz`` module and explain why``pytz.all_timezones`` contains over 500 individual timezones. We'llalso find the reason why ``pytz`` is not part of the standard Python,why it gets updated so often and why even that won't solve all yourproblems.