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

Bug #10591 inDaylightTime fails
Submitted: 2007-04-02 17:18 UTC
From: k1mgy Assigned: c01234
Status: Closed Package: Date
PHP Version: 5.1.4 OS: CentOS (Linux)
Roadmaps: (Not assigned)    
Subscription  


 [2007-04-02 17:18 UTC] k1mgy (Mark Richards)
Description: ------------ inDaylightTime() is returning FALSE for a date and in a timezone that has DST. Test script: --------------- $oStartDate = new Date(1180656000); // 5/31/07 UTC $oStartDate->setTZByID("UTC"); $oStartDate ->convertTZByID("America/New_York"); if ($oStartDate->inDaylightTime($oStartDate)) printf("It's DST in New York"); else printf("It's EST in New York"); Returns: It's EST in New York $oStartDate = new Date(1180656000); // 5/31/07 UTC $oStartDate->setTZByID("America/New_York"); if ($oStartDate->inDaylightTime($oStartDate)) printf("It's DST in New York"); else printf("It's EST in New York"); Also returns: It's EST in New York Expected result: ---------------- Expect DST to be true Actual result: -------------- DST is not set true.

Comments

 [2007-04-02 21:06 UTC] k1mgy (Mark Richards)
Changed package reference from PEAR to Date where it belongs.
 [2007-04-04 00:09 UTC] k1mgy (Mark Richards)
fwiw: Further checking shows that problems with the pear date class have been previously reported and in one case patched. It also appears that this class may have compatibility issue/s with php5. Since php 5.2 includes a similar date class, perhaps this pear class is no longer applicable?
 [2007-11-06 01:27 UTC] c01234 (Chuckie Chuck)
This is now OK in CVS
 [2008-03-23 23:06 UTC] c01234 (Chuckie Chuck)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Date