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

Bug #4489 CGI error on Windows 2003 / IIS6 for DST handling code
Submitted: 2005-05-31 18:39 UTC
From: jpm at mysql dot com Assigned:
Status: No Feedback Package: Date
PHP Version: 4.3.11 OS: Windows 2003
Roadmaps: (Not assigned)    
Subscription  


 [2005-05-31 18:39 UTC] jpm at mysql dot com
Description: ------------ See description of problem here: http://lists.mysql.com/eventum-users/1578 ==== I just moved my Eventum 1.5.3 test installation from : - W2K Sp4 / PWS - MySQL 4.1.11 - PHP 4.3.10 - mailserver Lotus Notes 5.0.12 / IMAP to production environment : - Windows 2003 SP1 / IIS 6.0 - MySQL 4.1.12 - PHP 4.3.11 - mailserver Lotus Notes 5.0.12 / IMAP and had the same cgi error when viewing entry details. I found a windows related problem in the include PEAR file timezone.php. Below a fixed version from the function causing the error: /** * Is the given date/time in DST for this time zone * * Attempts to determine if a given Date object represents a date/time * that is in DST for this time zone. WARNINGS: this basically attempts to * "trick" the system into telling us if we're in DST for a given time zone. * This uses putenv() which may not work in safe mode, and relies on unix time * which is only valid for dates from 1970 to ~2038. This relies on the * underlying OS calls, so it may not work on Windows or on a system where * zoneinfo is not installed or configured properly. * * @access public * @param object Date $date the date/time to test * @return boolean true if this date is in DST for this time zone */ function inDaylightTime($date) { // This additional line immediately returns from the function. return date("I"); // End MS Windows work around code. // Beginning of the original PEAR code. $env_tz = ""; if(getenv("TZ")) { $env_tz = getenv("TZ"); } putenv("TZ=".$this->id); $ltime = localtime($date->getTime(), true); putenv("TZ=".$env_tz); return $ltime['tm_isdst']; } More about the problem : http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=MS_Windows_Installations#MS_Windows_2003_and_IIS6 ==== So my question is the following: if date('I') is available to check if the given date is on DST or not, why do you need the code above?

Comments

 [2005-10-02 13:50 UTC] pajoye
Please provide a script to reproduce your problem, giving the actual result and the result you expect.