Storage & interchange

Persisting and exchanging time across databases, formats, and the wire.

PostgreSQL timestamptz stores an instant; timestamp stores civil wall time with no zone. MySQL / SQLite DATETIME vs TIMESTAMP in MySQL; and SQLite has no real date type at all. MongoDB BSON Date is UTC milliseconds since the epoch โ€” no zone fidelity. JSON JSON has no date type โ€” pick a strict string format and document it. YAML YAML does have a timestamp type โ€” and it will coerce your strings when you least expect it.