Functional patterns
Reusable approaches for handling time correctly in practice.
Parsing user input
Human input is ambiguous and locale-dependent โ never trust a lenient parser with it.
Your own client โ server
You control both ends โ agree one explicit wire contract and serialize symmetrically.
3rd-party data
Trust but verify โ validate external timestamps against an expected format and fail loudly.
Store vs display
Store instants in UTC; convert to the user's local zone only at display time.
Pitfalls & anti-patterns
A citable index of the warnings scattered across this guide.