ID: 14391 Comment by: [EMAIL PROTECTED] Old Reported By: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Date/time related Operating System: Windows 2000 Server PHP Version: 4.0.6 New Comment:
i have two systems a)redhat 7.0 and b) win2000. both have PHP Version 4.1.1 each has exactly the same code. any calls to gmmktime on linux are fine, but win2000 is not, which is unfortunate due to the fact that it's a calendar application. any idea when this will be cleared up? Previous Comments: ------------------------------------------------------------------------ [2002-01-20 10:54:51] [EMAIL PROTECTED] Here's an example: first of all, to show that the system understands what's going on: $ date "+%c %Z" Tue Dec 18 22:51:16 2001 GMT $ date -u "+%c %Z" Tue Dec 18 22:51:21 2001 GMT - same result. so the machine knows what tz it's in. Now, I'm in GMT at the moment, so echo date("H:i",mktime(22,20,00,12,18,01))."<p>"; //gives 22.20 echo gmdate("H:i",mktime(22,20,00,12,18,01))."<p>"; // gives 22.20 as expected. but... echo date("H:i",gmmktime(22,20,00,12,18,01))."<p>"; //gives 21.20 echo gmdate("H:i",gmmktime(22,20,00,12,18,01))."<p>"; // gives 21.20 These should also give 22.20, so it looks to me that gmmktime() is screwed. Max ------------------------------------------------------------------------ [2002-01-20 10:41:42] [EMAIL PROTECTED] I've got this problem on 4.0.5 on solaris, could someone confirm this for me? SunOS mimosa 5.7 Generic_106541-14 sun4u sparc SUNW,Ultra-4 Max ------------------------------------------------------------------------ [2002-01-13 14:34:48] [EMAIL PROTECTED] Could be. Could also be that some of the assumptions made in ext/standard/datetime.c on lines 172-190 are just wrong for Windows-based systems. I'll do some testing next week, now that I finally have a Windows test system (with documentation) aside my trustworthy Linux. <offtopic> A machine that can boot two different operating systems is called 'dual-boot'. Mine boots to Linux, Solaris and Windows 2000. So should it be called 'trial-boot'? </offtopic> ------------------------------------------------------------------------ [2002-01-13 07:45:40] [EMAIL PROTECTED] mmm, I think this is to blame at Microsoft then. Derick ------------------------------------------------------------------------ [2002-01-13 06:56:08] [EMAIL PROTECTED] Bug confirmed also with 4.1.1 on Windows 2000 server. Everything fine on Linux (4.1.1 and 4.0.3). Note that depending on your country, the result might be wrong on summer time too. I'm too living on a timezone GMT+2 (Finland), but we didn't switch to using daylight savings time until 1977. Which is correctly detected on Linux and wrong on Windows 2000 server (it thinks that we had daylight savings also on 1970-1976). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=14391 Edit this bug report at http://bugs.php.net/?id=14391&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]