From 5e46f636a54f93f9fff6f9eb0a01fc0db70f069a Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 7 Oct 2005 20:32:17 +0000 Subject: [PATCH] - MFH: Make the Windows guessing routines actually return the guessed timezone. --- ext/date/php_date.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.40.0