From: Derick Rethans Date: Fri, 7 Oct 2005 20:31:57 +0000 (+0000) Subject: - Make the Windows guessing routines actually return the guessed timezone. X-Git-Tag: RELEASE_0_9_1~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f70499f83ab0568f3dfcc5f8c5ee1d2a0d447ef1;p=php - 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 9f45a62b9d..6ed69160b5 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -340,6 +340,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: @@ -357,8 +358,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 */