]> granicus.if.org Git - php/commitdiff
@- Changed 'Z' flag to date() to always return timezone offset with
authorAndrei Zmievski <andrei@php.net>
Wed, 17 Jan 2001 21:09:16 +0000 (21:09 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 17 Jan 2001 21:09:16 +0000 (21:09 +0000)
@  negative sign if it's west of UTC. (Andrei)

ext/standard/datetime.c

index dda3cde0e25b78eb6f4f42cc873ef339026e34eb..dfb83e04bac7c641e73bb488e9db6bb628c48871 100644 (file)
@@ -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;