~/talk

import time_travel: A Primer on Timezones in Python

Talkat PyCon 2018 · on Friday, 2018-05-11· [python, web-platform]

Argues that timezone bugs are avoidable by using concrete tools and patterns: Python's datetime/TZInfo with the fold field for ambiguous times, dateutil's gettz plus resolve_imaginary to shift nonexistent wall times, and pytz's localize/normalize workflow to avoid static-offset surprises. Recommends storing timestamps in UTC, preserving wall time as ISO 8601 plus an IANA name, and keeping the tzdb current (updated several times a year). Shows a monkey‑patch wrapper that preserves TZ names as a workable but hacky serialization.

AI-written summary · about

  1. 0:00Intro
  2. 1:39There is no escape.
  3. 3:17I work at Clara Labs
  4. 4:08Timezones contextualize datetimes
  5. 5:09Coordinated Universal Time
  6. 5:44IANA Timezone Database
  7. 7:01Limitations of UTC Offset
  8. 7:29Ambiguous Times
  9. 8:14Imaginary Times
  10. 8:59datetime.tzinfo
  11. 11:00datetime.datetime
  12. 16:18dateutil.tz
  13. 24:26Timezone-Aware Sandwich
  14. 26:03Keep your IANA data current
  15. 26:41What do you need to preserve?
  16. 27:39Serializing a timestamp to ISO 8601
  17. 27:53Deserializing an ISO 8601 timestamp
  18. 28:34Serializing a wall time
  19. 29:44What about strptime/strftime?
  20. 31:54Postgres datetime types
  21. 34:11MySQL datetime types
  22. 36:39Storing wall times
  23. 37:04Storing timestamps
~/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.