Time Zones and Calendars are a PITA
summary
Time handling is full of gotchas: half hour offsets and leap seconds exist, DST rules change with little or no notice so the tz database updates 5–25 times a year, and operating systems or bundled PHP builds go out of date unless refreshed with pecl timezonedb or OS packages. PHP’s DateTime is mutable by design (a legacy bug) so prefer DateTimeImmutable for safe math. Store either a UTC epoch for an exact instant or a local datetime plus timezone for user‑local future events, and beware ISO week vs calendar year differences (week 53).
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:46Quiz Time!
- 10:48Timezone Support
- 13:57Default Timezones
- 15:44Unix timestamps and timezones
- 19:27Parsing Dates
- 21:11Modifying Dates
- 23:15Immutable Date Time
- 25:07Using Timezones
- 27:41Timezones Utilities Restricting listing by geographical location
- 29:37Intervals
- 36:31Relative Time "first day of next month"
- 37:25Periods literating over a period
- 43:26Calendar








