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

Bug #16299 [PATCH] Date_TimeZone::inDaylightTime had nasty side-effects due to altering TZ
Submitted: 2009-06-06 06:20 UTC
From: mackstann Assigned:
Status: Open Package: Date (version 1.4.7)
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-06 06:20 UTC] mackstann (Nick Welch)
Description: ------------ inDaylightTime() alters the $TZ environment variable temporarily to do its calculation, and attempts to restore $TZ back to its original state, but does it wrong when $TZ was unset. Instead of re-deleting it, it would set it to an empty string, which caused nasty side effects. The fix is to re-unset it by doing putenv("TZ"), if it was originally unset.

Comments

 [2009-06-06 06:21 UTC] mackstann (Nick Welch)
The following patch has been added/updated: Patch Name: inDaylightTime-fix Revision: 1244251290 URL: http://pear.php.net/bugs/patch-display.php?bug=16299&patch=inDaylightTime-fix&revision=1244251290&display=1