The time paradox: Building Timezone-safe python/django applications.
summary
Root cause: UTC-stored timestamps plus per-user local‑time expectations and staggered DST rules cause missing Q1 revenue and mis-scheduled jobs. Tools and fixes: Python/Django with Postgres timestamp with time zone, JavaScript (suggested Luxon or date‑fns), and a middleware that uses cookie/header/user setting to call timezone.activate so DB reads convert to the user zone. Rules: store past events in UTC, store intent (local time + tz) for scheduling, test DST edges; the middleware solution works to align reports and schedules.
AI-written summary · about
chapters (7)
- 0:00Time zone chaos
- 3:17What is a timestamp
- 6:55Time zones and their quirks
- 11:08Past events and future tasks
- 16:55Time zones in Python, JavaScript and databases
- 21:50Time zones in Django
- 26:08Three rules for safe time zones
related talks
26mHandling Timezones in Python
18mManaging Time like a Time Lord: It's bigger on the inside
41mimport time_travel: A Primer on Timezones in Python
28mTime Zones in Python: Everything You Wish You Didn't Need
30mWorking with Time Zones: Everything You Wish You Didn't Need to Know
26mIt's about time
32mIt's about time
21mBuilding maintainable Django projects: the difficult teenage years
