From: scochrane at mackaysstores dot co dot uk Operating system: NT4 Server PHP version: 4.3.0 PHP Bug Type: Date/time related Bug description: gmdate()/gmmtime() and date()/mktime() not consistant
I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it off. Both Servers have same PHP version and O/S (NT4 Server). When I use this: echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate it returns: 2003-03-30 on Server 1 and 2003-03-31 on Server 2 ------------------------------- when I use this: echo date("Y-m-d", mktime("last Sunday")); // no gmdate! it returns: 2003-03-31 on Server 1 and 2003-03-31 on Server 2 ------------------------------- When I use this: echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime! it returns: 2003-03-31 on Server 1 and 2003-03-30 on Server 2 ------------------------------- when I use this: echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime! it returns: 2003-03-31 on Server 1 and 2003-03-30 on Server 2 So I have used every combination and cannot get both Servers to return the correct date. I need it to return 2003-03-30 on both Servers - as it should. p.s. I cannot just change the 'Automatic Daylight' configuration as I need it to run in over 250 seperate Servers (they may have different OS settings)! Cheers, Stuart -- Edit bug report at http://bugs.php.net/?id=22976&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22976&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22976&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22976&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22976&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22976&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22976&r=support Expected behavior: http://bugs.php.net/fix.php?id=22976&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22976&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22976&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22976&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22976&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22976&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22976&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22976&r=gnused