Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.21.8

Bug #13865 One-hour-shift in Christian driver
Submitted: 2008-05-09 05:11 UTC Modified: 2009-03-15 23:15 UTC
From: yunosh Assigned: kguest
Status: Closed Package: Date_Holidays (version 0.19.1)
PHP Version: Irrelevant OS:
Roadmaps: 0.21.1    
Subscription  


 [2008-05-09 05:11 UTC] yunosh (Jan Schneider)
Description: ------------ The holidays from the Christian driver are off-by-one, at least in CEST timezones. This didn't happen before the 0.19 releases. The German driver works fine. Whitsun for example has the following date specified: var '_date' => object(date) var 'year' => int 2008 var 'month' => int 5 var 'day' => int 11 var 'hour' => int 1 var 'minute' => int 0 var 'second' => int 0

Comments

 [2008-05-23 16:22 UTC] kguest (Ken Guest)
The Christian driver hasn't changed since release 0.13.0 so this explanation is unlikely. (though I have confirmed the error via a newly working test suite) will analyse this further.
 [2008-08-23 11:22 UTC] kguest (Ken Guest)
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR.
 [2008-08-23 11:51 UTC] yunosh (Jan Schneider)
Eh, you have confirmed that you can reproduce it, in your comment from May 23. Do you say that your test suite reports something different now than then?
 [2009-02-16 13:43 UTC] yunosh (Jan Schneider)
If it is of any use: this behavior can be seen again at the moment, e.g. with the carnival related holidays.
 [2009-03-11 15:52 UTC] yunosh (Jan Schneider)
This happens because Date::addSpan() considers daylight saving times. This could easily worked around by using Date::addDays() instead, but this is only available with Date 1.5.0 which is still alpha by the time of this writing. The attached patch adds a _addDays() method to Date_Holidays_Driver which is a copy from Date's version. I only patched the Christian and Germany drivers so far, as a proof of concept. The patch also contains the changes for ticket #16021.
 [2009-03-11 15:53 UTC] yunosh (Jan Schneider)
The following patch has been added/updated: Patch Name: addDays.patch URL: patch addDays.patch
 [2009-03-14 22:05 UTC] yunosh (Jan Schneider)
The following patch has been added/updated: Patch Name: addDays.patch URL: patch addDays.patch
 [2009-03-14 22:06 UTC] yunosh (Jan Schneider)
The udpated patch is without the changes for bug #16021, and against the latest CVS.
 [2009-03-15 23:15 UTC] kguest (Ken Guest)
-Status: Assigned +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.