A Tale about Time
summary
Explains concrete rules and gotchas: store instants as UTC plus user location/locale, prefer RFC3339 for persistence, and use DateTimeImmutable (PHP 7.1 adds microseconds that break strict equality). Demonstrates parsing tricks like "first day of next month" and overflow/underflow behavior, recommends a testable clock interface, warns of the 2038 limit on 32‑bit timestamps and the real-world leap second added in 2016, and even sketches Mars‑time issues.
AI-written summary · about








