Issue Type: Bug Created: 2010-09-23T07:26:05.000+0000 Last Updated: 2011-05-01T07:12:10.000+0000 Status: Reopened Fix version(s): Reporter: Mathieu Decaffmeyer (mathi) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date
Related issues: Attachments:
Creating a Zend_Date object based on a string (format "yyyy-MM-dd HH:mm:ss") including a year like 2041 and using specific timezones, generates a wrong date output.
Here is the code : $t = '2041-08-01 00:00:00'; $zd = new Zend_Date($t, 'yyyy-MM-dd HH:mm:ss'); echo $zd;
Expected output: "1 août 2041 00:00:00" Output: "1 août 2041 01:00:00"
The bug may be reproduced using timezone "Europe/Brussels", "America/New_York", and others probably. There is no error when using e.g. "Europe/Berlin" timezone.
There is no error using DateTime classes in PHP. Code comparing ZF Zend_Date class output with PHP DateTime class below:
$t = '2041-08-01 00:00:00'; //Try in DateTime $dt = new DateTime($t); echo $dt->format('Y-m-d H:i:s') . "
"; //Try with Zend_Date $zd = new Zend_Date($t, 'yyyy-MM-dd HH:mm:ss'); echo $zd . "
I asked other people to test it on IRC #zftalk, and they also may reproduce the bug.
Posted by Shawn Stratton (mfacenet) on 2010-09-23T07:30:45.000+0000
I believe this is one of Thomas's components.
Posted by Ryan Mauger (bittarman) on 2010-09-23T08:09:43.000+0000
Posted by Shawn Stratton (mfacenet) on 2011-04-30T03:45:19.000+0000
This was likely fixed by a similar ticket, cannot reproduce.
Posted by Thomas Weidner (thomas) on 2011-05-01T07:12:10.000+0000
Reopening issue: Needs to be verified and added as test Assigned to component author
Have you found an issue?
See the Overview section for more details.