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

Bug #6246 inDaylightTime() crashes Apache 2.0.55 with status 3221225477
Submitted: 2005-12-14 20:50 UTC
From: ariel at trisolutions dot com dot br Assigned: pajoye
Status: Closed Package: Date
PHP Version: 5.1.1 OS: Windows XP SP2
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 28 - 12 = ?

 
 [2005-12-14 20:50 UTC] ariel at trisolutions dot com dot br
Description: ------------ Using Date 1.4.6. Calling Date_TimeZone::inDaylightTime() crashes Apache 2.0.55 with the following message: [notice] Parent: child process exited with status 3221225477 -- Restarting. The following code reproduces the error: <? require "Date.php"; $date = new Date; echo $date->getDate(); echo "<BR>"; echo "Is in daylight saving time? ". $date->inDaylightTime($date)."<BR>"; ?> Replacing inDaylightTime() by this simple piece of code: function inDaylightTime($date) { return date("I"); } fixes that bug. I ask myself what's the reason for messing up with putenv() and getenv()?

Comments

 [2005-12-14 20:58 UTC] ariel at trisolutions dot com dot br
Note that with the replaced version of the code, there's no need to pass any argument to inDaylightTime() and this function can be called statically: function inDaylightTime() { return date("I"); } Of course, you cannot test if a given date is in daylight time, only the current date. But anyway, I think this is the purpose of this function.
 [2005-12-14 21:31 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!
 [2005-12-16 16:09 UTC] ariel at trisolutions dot com dot br
If that is the case, why don't use: function inDaylightTime($date) { return date( 'I', $date->getDate(DATE_FORMAT_UNIXTIME) ); } That serves the purpose of the function. Anyway, hope the fix to come.
 [2006-12-08 09:18 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!