A Day Has Only 24±1 Hours: import pytz

Handle easily all those timezone issues your system knows about. Fear those it doesn't.

Tags: Data Science, Science

Scheduled on wednesday 16:00 in room media


Miroslav Šedivý (@eumiro)

Using Python to make the sun shine and the wind blow. hjkl juggler and languages enthusiast. Living in the Europe/Berlin timezone, saving text files as UTF-8, typing on a standard US keyboard layout with a Compose key.


On the last Sunday of October “we get one more hour of sleep” but may spend much more time debugging code dealing with the timezones, daylight saving time shifts and datetime stuff in general.

We'll look at a few pitfalls you may encounter when working with datetimes in Python. We'll discover the pytz module and explain why pytz.all_timezones contains over 500 individual timezones. We'll also 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 your problems.