Beyond DateTime: a bulletproof approach to date and time
summary
Claim: PHP needs richer temporal types, not just DateTime, and using a Java-inspired API prevents bugs. Concrete tools: Brick\DateTime (LocalDate, LocalTime, Instant, Duration, Period), frontend options like Luxon or the Temporal proposal, and database advice to store local timestamps plus zone id instead of trusting Postgres timestamptz. Practices: use Clock injection for testability, emit ISO 8601, note Unix epoch ≈1.5 billion seconds now and atomic clocks lose ~1s per billion years. The library is immutable and noticeably reduces timezone bugs.
AI-written summary · about
chapters (5)
- 0:00Start
- 1:01What is time, anyway?
- 6:12A brief history of timekeeping
- 22:20Domain-Driven Design is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of a domain.
- 39:38PAPER AIRLINES








