A Day Has Only 24±1 Hours

A Day Has Only 24±1 Hours

A Day Has Only 24±1 Hours (Miroslav Šedivý) (Germany) is an English session in the online PyCon HK 2020 Spring.

Hong Kong used to switch to the daylight saving time every year to get “one more hour of sleep”, but much more time may have been spent 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 module, explain why it contains over 500 individual time zones while focusing on the Asia/Hong_Kong entry. 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.

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

Slide: https://speakerdeck.com/eumiro/a-day-has-only-24-1-hours-pycon-hong-kong-2020

Level: Intermediate

Speaker Bio: Miroslav Šedivý

Born in the Europe/Bratislava time zone, studied in the Europe/Paris time zone, working in the Europe/Berlin time zone.

At my job at solute GmbH, I’m using Python to get you the lowest prices online. In your time zone. 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.


Session Time in HKT: 5:30 PM on 9 May 2020 Saturday.
Session Time in GMT: 9:30 AM on 9 May 2020 Saturday.