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

index 9f45a62b9d87ab710a576c3723e61fc77db44614..6ed69160b592711d588a8415db09c17184900a74 100644 (file)
@@ -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 */