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

Bug #1107 setHour() returns wrong value
Submitted: 2004-03-31 13:31 UTC
From: mikeatwork at ukonline dot co dot uk Assigned: pajoye
Status: No Feedback Package: Date
PHP Version: 4.3.3 OS: Redhat Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-03-31 13:31 UTC] mikeatwork at ukonline dot co dot uk
Description: ------------ Setting an instance of Date with a valid timestamp and then querying the getHour() method produces a strange value! Adding debug output in to the setDate() method shows that the correct value of '13' is being extracted for the hour by the regular expression. The servers clock is currently set at: [root@DV1 pear]# date Wed Mar 31 14:33:25 BST 2004 Suggestions on the #pear IRC channel are that 'BST' is not handled? Reproduce code: --------------- <?php require 'Date.php'; $dateObj = new Date; $dateObj->setDate("2004-03-31T13:36:07Z", DATE_FORMAT_ISO_EXTENDED); echo $dateObj->getHour(); ?> Expected result: ---------------- 13 Actual result: -------------- 7

Comments

 [2004-04-08 15:36 UTC] mikeatwork at ukonline dot co dot uk
Bug may be related to the PHP error mentioned at http://bugs.php.net/bug.php?id=23467
 [2004-05-16 11:42 UTC] paj at pearfr dot org
Hello, Cannot be fixed without rewriting most of date_span. The idea to store "huge" timespan using seconds was not good. I doubt that will get fixed in the 1.x branch. -- Pierre
 [2004-05-16 12:24 UTC] paj at pearfr dot org
Ignore last comment, wrong bug id :) About this issue, cannot reproduce with latest release. Please try it again, --Pierre
 [2005-03-07 04:00 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!