Bug 1385597 - Properly restore system timezone on other POSIX systems. r?ehsan
MozReview-Commit-ID: 4viT99nrph4
--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp
+++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp
@@ -157,24 +157,24 @@ nsRFPService::UpdatePref()
}
// PR_SetEnv() needs the input string been leaked intentionally, so
// we copy it here.
tz = ToNewCString(tzValue);
if (tz) {
PR_SetEnv(tz);
}
} else {
-#if defined(XP_LINUX) || defined (XP_MACOSX)
+#if defined(XP_WIN)
+ // For Windows, we reset the TZ to an empty string. This will make Windows to use
+ // its system timezone.
+ PR_SetEnv("TZ=");
+#else
// For POSIX like system, we reset the TZ to the /etc/localtime, which is the
// system timezone.
PR_SetEnv("TZ=:/etc/localtime");
-#else
- // For Windows, we reset the TZ to an empty string. This will make Windows to use
- // its system timezone.
- PR_SetEnv("TZ=");
#endif
}
}
nsJSUtils::ResetTimeZone();
}
void