Skip to content
Permalink
Browse files
Bug 20981: On Windows, check TZ for timezone first
  • Loading branch information
arthuredelstein committed Jan 14, 2017
1 parent 0357c67 commit 0a6e320509242bc78b67d0c64b68724317c5a0a1
Showing with 7 additions and 0 deletions.
  1. +7 −0 intl/icu/source/common/putil.cpp
@@ -984,6 +984,13 @@ uprv_tzname(int n)
{
const char *tzid = NULL;
#if U_PLATFORM_USES_ONLY_WIN32_API
char* envValue = getenv("TZ");
if (envValue != NULL) {
char *tmpTzid = (char*) uprv_malloc(uprv_strlen(envValue) + 1);
uprv_strcpy(tmpTzid, envValue);
return tmpTzid;
}

tzid = uprv_detectWindowsTimeZone();

if (tzid != NULL) {

0 comments on commit 0a6e320

Please sign in to comment.