From 218ab9373720aa2754a8d27e0667420d6c74adf6 Mon Sep 17 00:00:00 2001 From: Arthur Edelstein Date: Sat, 14 Jan 2017 01:58:14 -0800 Subject: [PATCH] Bug 20981: On Windows, check TZ for timezone first --- intl/icu/source/common/putil.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/intl/icu/source/common/putil.cpp b/intl/icu/source/common/putil.cpp index 03f6548689d23..63c1789512c24 100644 --- a/intl/icu/source/common/putil.cpp +++ b/intl/icu/source/common/putil.cpp @@ -1013,6 +1013,11 @@ uprv_tzname(int n) { const char *tzid = NULL; #if U_PLATFORM_USES_ONLY_WIN32_API + char* envValue = getenv("TZ"); + if (envValue != NULL) { + return uprv_strdup(envValue); + } + tzid = uprv_detectWindowsTimeZone(); if (tzid != NULL) { -- GitLab