HeadlinesBriefing favicon HeadlinesBriefing.com

7 Time Types for Developer Debugging

DEV Community •
×

A DEV Community article argues most datetime bugs stem from mixing up distinct time types. Developers often confuse timestamps, local times, and timezones, leading to arguments and silent errors. The piece establishes a shared vocabulary, introducing seven fundamental categories to clarify what each represents and when to use them.

The core distinction is between Instant (a global moment in physics) and Zoned DateTime (a local time with an IANA timezone like `Europe/Vienna`). Offsets are snapshots, not intent. Recurring rules are patterns that generate times, not events themselves. This framework prevents treating one type as another, a common source of category errors.

Adopting this vocabulary helps teams choose correct storage formats and avoid silent conversions. It shifts discussions from ambiguous terms like "timestamp" to precise requirements. For most applications, ignoring leap seconds is acceptable. The next article in the series will tackle the ambiguity of deadlines like "Submit by June 5th."