From: Derick Rethans Date: Fri, 7 Oct 2005 20:32:17 +0000 (+0000) Subject: - MFH: Make the Windows guessing routines actually return the guessed timezone. X-Git-Tag: php-5.1.0RC2~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e46f636a54f93f9fff6f9eb0a01fc0db70f069a;p=php - MFH: Make the Windows guessing routines actually return the guessed timezone. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index a2c6c78568..555615c4ea 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -338,6 +338,7 @@ static char* guess_timezone(TSRMLS_D) case TIME_ZONE_ID_UNKNOWN: /* we have no clue what it is, return UTC */ php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use 'UTC' instead."); + tzid = "UTC"; break; case TIME_ZONE_ID_STANDARD: @@ -355,8 +356,8 @@ static char* guess_timezone(TSRMLS_D) } php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use '%s' for '%.1f/DST' instead.", tzid, (float) ((tzi.Bias + tzi.DaylightBias) / -60)); break; - } + return tzid; } #endif /* Fallback to UTC */