qcubed/framework — pull request #497 by spekary (2014-10-03 17:12:24+00:00)
Title: regression-UnserializingDateTime

This fixes a problem I introduced in the last QDateTime cleanup. I assumed that the unserialize bug was PHP 5.2 only. It is still in PHP 5.4. PHP cannot use unserialized DateTime objects. This fix reinstates the previous code to handle unserializing, and adds the additional fix to the old code to correctly preserve the timezone. The old code converted the ID timezone to an offset timezone, which can cause havoc with calculations across daylight savings time boundaries.

This fix also does some checks to make sure getTimezone returns a value. PHP manual says it could return false.