From: Andrei Zmievski Date: Wed, 17 Jan 2001 21:09:16 +0000 (+0000) Subject: @- Changed 'Z' flag to date() to always return timezone offset with X-Git-Tag: php-4.0.5RC1~538 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccd94c48317080231d5a4def82c5869ca83e24d0;p=php @- Changed 'Z' flag to date() to always return timezone offset with @ negative sign if it's west of UTC. (Andrei) --- diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index dda3cde0e2..dfb83e04ba 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -441,7 +441,7 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) #if HAVE_TM_GMTOFF sprintf(tmp_buff, "%ld", ta->tm_gmtoff); #else - sprintf(tmp_buff, "%ld", ta->tm_isdst ? timezone - 3600 : timezone); + sprintf(tmp_buff, "%ld", ta->tm_isdst ? -(timezone - 3600) : -timezone); #endif strcat(return_value->value.str.val, tmp_buff); break;