#17228 [Fbk->Bgs]: timezone incorrect in date

From: Date: Wed, 11 Sep 2002 16:06:43 +0000
Subject: #17228 [Fbk->Bgs]: timezone incorrect in date
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19086@lists.php.net to get a copy of this message
ID: 17228 Updated by: sniper@php.net Reported By: darron@kewl.org -Status: Feedback +Status: Bogus Bug Type: Date/time related Operating System: solaris 2.7 PHP Version: 4.1.2 New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2002-07-04 13:38:12] eru@php.net Thank you for taking the time to report a problem with PHP. Unfortunately your are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. It would be even better, if you could retest with a CVS-snapshot. Thanks for your help. ------------------------------------------------------------------------ [2002-05-14 19:53:04] darron@kewl.org The quick fix may only be valid for the UK (GMT/BST) The altzone offset may be a better indicator that GMT is not the correct local timezone elsewhere. ------------------------------------------------------------------------ [2002-05-14 19:15:36] darron@kewl.org The following: print date( "r Z T", time() ); print gmdate( "r Z T", time() ); Gives this output: Tue, 14 May 2002 22:56:09 +0100 3600 GMT Tue, 14 May 2002 21:56:09 +0000 0 GMT Standard Time Comment: Internally solaris creates an integer named daylight after localtime() is called if an alternate time zone is in use. PHP ignores this and always uses tzname[0] Quick fix: diff ext/standard/datetime.c~ ext/standard/datetime.c 256c256,259 < tname[0] = tzname[0]; --- > if( daylight ) > tname[0] = tzname[1]; > else > tname[0] = tzname[0]; After patching the PHP code produces: Wed, 15 May 2002 00:13:40 +0100 3600 BST Tue, 14 May 2002 23:13:40 +0000 0 GMT Standard Time ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17228&edit=1

« previous php.bugs (#19086) next »