~/talk

Time Zones in Python: Everything You Wish You Didn't Need

TalkinSpanishat PyCon US 2026 · 2026-05-13..05-19· [python, web-platform]
links:none on file
slides:none on file

Covers practical pitfalls when working with time zones in Python using zoneinfo (Python 3.9), the PyPI tzdata package, and the fold attribute (Python 3.6). Gives concrete examples — zones that skip whole days (Kiribati) or apply DST twice (Morocco), a reproduced bug causing non‑transitive datetime equality with a detailed debugging trace, a created map of standard‑hour offsets, and explicit rules for when to store local time versus converting to UTC for correct comparisons and arithmetic.

AI-written summary · about

  1. 0:00Time zones intro
  2. 1:30UTC basics
  3. 2:32Abbreviations confusion
  4. 4:18Daylight saving changes
  5. 6:49China and Kiribati extremes
  6. 8:13Why not UTC
  7. 10:01Python timezone model
  8. 12:55Ambiguous and imaginary times
  9. 15:47Python pitfalls
  10. 18:16Local timezone support
  11. 20:02IANA timezone data
  12. 21:52Time comparisons confusion
  13. 24:42Datetime equality and math
  14. 26:28Best practices
  15. 26:52Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.