@- Changed 'Z' flag to date() to always return timezone offset with

@  negative sign if it's west of UTC. (Andrei)
This commit is contained in:
Andrei Zmievski 2001-01-17 21:09:16 +00:00
parent 457888ac44
commit ccd94c4831

View 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;