ZF-5745: Zend_Date set-by-array corrupts day in DST

Issue Type: Sub-task: Test Created: 2009-02-11T05:52:26.000+0000 Last Updated: 2009-02-12T05:03:31.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Georg-Hendrik Haan (haan) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


Additional unit test:

Expected: 2009-08-28T22:00:00+02:00 Result: 2009-08- 29 T22:00:00+02:00

<pre class="highlight">
        $date = new Zend_Date(array('year' => 2009, 'month' => 8, 'day' => 28,
                                    'hour' => 22, 'minute' => 00, 'second' => 00, 'de'));
        $this->assertSame('2009-08-28T22:00:00+02:00', $date->getIso());


Posted by Thomas Weidner (thomas) on 2009-02-11T06:16:56.000+0000

This failure is already fixed within trunk.

You'll have to wait for a new release, or use trunk as we can't edit a already released version.

Posted by Georg-Hendrik Haan (haan) on 2009-02-11T08:24:00.000+0000

We are using trunk ;-)

The test above is an additional unit test that fails on the trunk of two minutes ago (14046). It exposes a different failure.

The difference with the failure that was fixed in 5735 seems to be that this event falls within DST.

Posted by Thomas Weidner (thomas) on 2009-02-11T11:12:12.000+0000

I added exactly this unittest with r14048 as I've done it locally before. Still this unittest does not fail. I can't reproduce your problem.

Maybe you mixed trunk with release by your includepath.

Posted by Georg-Hendrik Haan (haan) on 2009-02-12T05:03:26.000+0000

Enter the twilight zone:

I have checked out 14060 and ran phpunit Zend/DateTest.php, and there are no failures.

Now, I've stripped all testXYZ() functions from DateTest leaving only the testTimezoneArray() function. Stripping and running reproduces the error.

<pre class="highlight">
There was 1 failure:

1) testTimezoneArray(Zend_DateTest)
expected string <2009-08-28T22:00:00+02:00>
difference      <         xxxx>
got string      <2009-08-29T00:00:00+02:00>

Tests: 1, Assertions: 5, Failures: 1.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.