Trim colon from the TZ env value Change-Id: Ieb9f0c13687fab06141ec2a6523923ae9f243f7f
diff --git a/src/third_party/starboard/rdk/shared/time_zone_get_name.cc b/src/third_party/starboard/rdk/shared/time_zone_get_name.cc index 25a9a53..70ba7c3 100644 --- a/src/third_party/starboard/rdk/shared/time_zone_get_name.cc +++ b/src/third_party/starboard/rdk/shared/time_zone_get_name.cc
@@ -73,6 +73,7 @@ /* Check TZ variable */ if (gTimeZoneBufferPtr == NULL) { const char* tz = getenv("TZ"); + if (tz && *tz == ':') ++tz; if (tz && isValidOlsonID(tz)) { strncpy(gTimeZoneBuffer, tz, sizeof(gTimeZoneBuffer)); gTimeZoneBuffer[sizeof(gTimeZoneBuffer) - 1] = 0;