Zend Framework

wrong time calculation using

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Not an Issue
  • Affects Version/s: 1.7.8
  • Fix Version/s: 1.8.1
  • Component/s: Zend_Date
  • Labels:
    None

Description

$zd = new Zend_Date("2009-03-29", "yyyy-MM-dd");
echo $zd."<br />";
$zd->addHour(1);
echo $zd."<br />";
$zd->addHour(1); #here is bug?
echo $zd."<br /><br />";

$zd = new Zend_Date("2009-03-29", "yyyy-MM-dd");
echo $zd."<br />";
$zd->setHour(1);
echo $zd."<br />";
$zd->setHour(2);
echo $zd."<br />";

#this code output:
Mar 29, 2009 12:00:00 AM
Mar 29, 2009 1:00:00 AM
Mar 29, 2009 3:00:00 AM #i was expecting: Mar 29, 2009 2:00:00 AM

Mar 29, 2009 12:00:00 AM
Mar 29, 2009 1:00:00 AM
Mar 29, 2009 3:00:00 AM #i was expecting: Mar 29, 2009 2:00:00 AM

i found that possible bug in 1.5 version but in 1.7.8 is reproducable also.
i hope that is bug and no bad date/time math from my side.

Activity

Hide
Thomas Weidner added a comment -

When you think that the wintertime->summertime change is a bug then you are right.

But then also your clock, and every other clock around the world has this bug.

As all known clocks have this bug we can finally conclude that it is not a bug, but well-known and expected behaviour.

Show
Thomas Weidner added a comment - When you think that the wintertime->summertime change is a bug then you are right. But then also your clock, and every other clock around the world has this bug. As all known clocks have this bug we can finally conclude that it is not a bug, but well-known and expected behaviour.
Hide
Jiri Vitek added a comment -

I'm sorry, i forget about it. Thank you fopr your time..

Show
Jiri Vitek added a comment - I'm sorry, i forget about it. Thank you fopr your time..
Hide
Thomas Weidner added a comment -

Closing as non-issue

Show
Thomas Weidner added a comment - Closing as non-issue

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: