]> granicus.if.org Git - php/commitdiff
- MFH: Make the Windows guessing routines actually return the guessed timezone.
authorDerick Rethans <derick@php.net>
Fri, 7 Oct 2005 20:32:17 +0000 (20:32 +0000)
committerDerick Rethans <derick@php.net>
Fri, 7 Oct 2005 20:32:17 +0000 (20:32 +0000)
ext/date/php_date.c

index a2c6c78568671f5b0aff30e57b4cf31b4752e9fb..555615c4eaf7b5f9e01fac0cc68b5e6954084e63 100644 (file)
@@ -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 */