Bug #14391 Updated: gmmktime, gmdate work incorrect

From: Date: Tue, 19 Feb 2002 20:40:38 +0000
Subject: Bug #14391 Updated: gmmktime, gmdate work incorrect
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-609@lists.php.net to get a copy of this message
ID: 14391 Updated by: freddie@bingham.net -Reported By: pilots@farlep.net +Reported By: freddie@bingham.net Status: No Feedback Bug Type: Date/time related Operating System: Windows 2000 Server PHP Version: 4.0.6 New Comment: Any updates on this bug as it appears to still be in 4.1.1 Previous Comments: ------------------------------------------------------------------------ [2002-02-14 00:00:03] php-bugs@lists.php.net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-01-27 18:40:15] frodo@interport.net 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? ------------------------------------------------------------------------ [2002-01-20 10:54:51] max@flipstorm.net 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] max@flipstorm.net 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] jah@php.net 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> ------------------------------------------------------------------------ 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/14391 -- Edit this bug report at http://bugs.php.net/?id=14391&edit=1

« previous php.bugs (#609) next »