Time is hard

Timezones are production data

Time bugs are not caused by clocks being weird. They are caused by pretending human time is just a number.

~5 minTech
scroll
01 · the shape

Midnight depends on where you stand

A subscription renews at midnight. Which midnight? The user, the business, the database, the server, or UTC? If nobody answers, production will.

time · same instant

The useful signal is usually already there.

system steady

Systems stories get more interesting when you can feel the pressure move through the stack.

02 · the move

Store instants and intent

Use UTC for instants, but keep the user timezone or business timezone when the rule depends on local time.

billing-schedule.json

The instant and the human rule are both part of the data.

03 · the check

Test the ugly calendar days

Daylight saving changes, leap years, month ends, and travel can all break code that only tested a sunny Tuesday.

reliability control room
brittle
resilient0
brittle: the system works only while the weather is perfect

Flip the switches and watch the story turn into a tiny operating model.

0values to keep: instant and timezone
0calendar edges worth testing
0server-local time assumptions
04 · the takeaway

Time is a domain model

Treat time rules like product rules, because users experience them that way.

source trail