ID: 36367 User updated by: geomouchet at yahoo dot com Reported By: geomouchet at yahoo dot com -Status: Feedback +Status: Open Bug Type: Date/time related Operating System: Linux 2.6.14.2 PHP Version: 4.4.2 New Comment:
I don't have my own web server. I'm using PHP at a web host. Can you try it on the latest build with the sample code I provided? Previous Comments: ------------------------------------------------------------------------ [2006-02-11 17:09:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-02-11 17:05:21] geomouchet at yahoo dot com Description: ------------ gmmktime() without any parameters returns the wrong time. My time zone is GMT-8, so gmmktime() should be local time PLUS 8 hours. Instead it returns local time minus 8 hours. This is different from the DST/summer time problem previously reported. My expected/actuals results are from a server on Pacific Time, but I also tried this on a web host in Hong Kong (ICDSoft), running PHP 4.4.2 and GMT is similarly offset in the wrong direction from Hong Kong local time. Reproduce code: --------------- echo "<p> PHP version: " . phpversion() . "</p>"; echo "<p>server time=" . date( "m/d/Y g:i A" ) . " " . mktime() . " server GMT=" . date( "m/d/Y g:i A", gmmktime() ) . " " . gmmktime() . " time zone setting=GMT" . date("O"). "</p>"; Expected result: ---------------- PHP version: 4.4.2 server time=02/11/2006 7:58 AM 1139702295 server GMT=02/11/2006 03:58 PM 1139644695 time zone setting=GMT-0800 Actual result: -------------- PHP version: 4.4.2 server time=02/11/2006 7:58 AM 1139673495 server GMT=02/10/2006 11:58 PM 1139644695 time zone setting=GMT-0800 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36367&edit=1