Time Programming Fundamentals
summary
Library CCTZ provides concrete APIs: break_time to convert an absolute time_point to a civil breakdown, make_time (and make_time_info) to map civil Y/M/D H:M:S plus an Olson time zone to an exact time_point with normalization and explicit handling of skipped or repeated hours. It uses system tzdata (Olson), ignores leap seconds, extends range with wide integers, and notes ~500 zones with updates ~8–10 times per year; examples include rounding to day start and adding six civil months.
AI-written summary · about
chapters (20)
- 0:00Intro
- 2:06Outline
- 3:42UTC - International Time Standard
- 4:26Absolute Time
- 7:03Interesting Time Zone Transitions
- 8:48Diagram of a Time String
- 9:40Classic Time APIs
- 11:18Classic Example
- 18:57What's missing?
- 22:13Hello, CCTZ
- 25:29The CCTZ Library Implementation
- 26:51Daylight-Saving Time Transitions
- 32:41cctz Make Time
- 36:34Translating Civil Time
- 38:32Parsing
- 41:58Example 3: Adding Months
- 44:00Example 4: Floor to Midnight
- 48:26Refactor: Old Code (Epoch Shifting)
- 50:21Refactor: NEW Code - BETTER
- 52:31Pro Tips
related talks
01h 05mWelcome To The Time Zone
38mA Matter of Time
01h 05mWorking with Time is Easy
41mimport time_travel: A Primer on Timezones in Python
35mMastering date/time handling with Elixir
58mIt's Time to Talk About Time
19mProgramming in the 4th Dimension - Making Time Make Sense
45mEverything You Never Wanted to Know About Time Zones
