Normalize to UTC on write vs keep locale-local with Zend_Date for cross-region dates
0 reputation · 14 Jun 2022, 12:56 UTC
Goal is to store and display dates for users in multiple regional time zones using Zend Framework 1 Zend_Date with locale-aware parsing and formatting.
Zend_Date supports explicit timezone via setTimezone() and locale patterns via PHP Intl, and parsing falls back to Zend_Date::setDefaultTimezone() or php.ini when no timezone is supplied. The component inherits PHP DateTime's timezone database, so conversion results can vary with tzdata and PHP version across environments. Zend_Date is deprecated in ZF2+ and removed in Laminas.
For persistence, one documented approach is normalizing to UTC on write and converting on display; the alternative is storing locale-local values and converting on read. The unresolved behavior is how ambiguous or skipped local times during DST transitions in regional zones should be handled, as Zend_Date does not define a canonical policy.
Which approach provides more deterministic round-tripping for cross-region users given implicit default timezone fallback? How should ambiguous DST times be resolved when Zend_Date offers no defined policy? Is UTC normalization worth the per-request conversion cost versus locale-local storage risk?