A Day Has Only 24±1 Hours

One Europe, 63 time zones to take care of.

Miroslav Šedivý

Best Practice Community Python general The Answer to Life the Universe and Everything Else failures/mistakes

See in schedule Download Slides

On the last Sunday of October you may get “one more hour of sleep” but as well may spend much more time debugging code dealing with the time zones, 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 dissect the pytz library, explain why it contains over 500 individual time zones while focusing on the 63 entries in Europe. 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. Do you know what happens after 2021 when the EU stops DST switching?

Two centuries of short-sighted propaganda and long-term chaos in forty-five minutes. Maybe that will make you want to avoid time zones in your code altogether!

Type: Talk (45 mins); Python level: Beginner; Domain level: Beginner

Miroslav Šedivý

solute GmbH

Born in Czechoslovakia, studied in France, living in Germany. Languages enthusiast and hjkl juggler. Using Python to get you the lowest prices online. I like to discuss the human stuff in the IT: how humans write in their languages, how they measure time and fiddle with time zones, and how they can teach the computers to do the boring stuff for them.