libicu: Respect TZ environment variable

This commit is contained in:
Yaksh Bariya
2021-10-20 07:45:26 +05:30
committed by Henrik Grimler
parent 6b613041f4
commit b0abc9efd3
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,17 @@
--- ./common/putil.cpp 2021-10-20 07:38:51.711938975 +0530
+++ ./common/putil.cpp.mod 2021-10-20 07:40:29.671938937 +0530
@@ -1132,10 +1132,11 @@
/* This code can be temporarily disabled to test tzname resolution later on. */
#ifndef DEBUG_TZNAME
-#if U_PLATFORM == U_PF_ANDROID
- tzid = gAndroidTimeZone;
-#else
tzid = getenv("TZ");
+#if U_PLATFORM == U_PF_ANDROID
+ if (tzid == NULL) {
+ tzid = gAndroidTimeZone;
+ }
#endif
if (tzid != NULL && isValidOlsonID(tzid)
#if U_PLATFORM == U_PF_SOLARIS