zendframework/zf2 — pull request #4318 by Thinkscape (2013-04-25 15:56:24+00:00)
Title: [WIP] \DateTime shim

This is work in progress, though I welcome any ongoing feedback.

## Rationale
With Zend Framework 2 the `Zend_Date` component has been deprecated in favor of php 5.3 `\DateTime` class. Unfortunately this class is peppered with numerous bugs that result in broken instances or broken calculations. Those bugs exist both in many 5.3.* versions but also in recent 5.4.* branches which make \DateTime even less usable for important applications.

I'm working my way through the most critical PHP bugs and creating a shim that will allow one to use a subclass (`Zend\Util\DateTime`) with fully compatible syntax, problem free in most PHP versions.

## Issues being addressed:
* [ ] [Bug 62561 - DateTime add 'P1D' adds 25 hours](https://bugs.php.net/bug.php?id=62561)
* [ ] [Bug 55253 - DateTime::add() and sub() result -1 hour on objects with time zone type 2](https://bugs.php.net/bug.php?id=55253)
* [ ] [Bug 60236 - TLA timezone dates are not converted properly from timestamp](https://bugs.php.net/bug.php?id=60236)
* [x] [Bug 54340 - DateTime::add() method bug](https://bugs.php.net/bug.php?id=54340)
* [ ] [Bug 52290 - setDate, setISODate, setTime works wrong when DateTime created from timestamp](https://bugs.php.net/bug.php?id=52290)
* [ ] [Bug 62896 - "DateTime->modify('+0 days')" Modifies DateTime Object](https://bugs.php.net/bug.php?id=62896)