[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-45.5.1esr-6.5-1] Bug 16622: Pref to spoof time zone as UTC



commit b3a3ef3688f3c196210d2004961fe2f8c5dba83b
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date:   Mon Nov 14 10:22:09 2016 -0800

    Bug 16622: Pref to spoof time zone as UTC
---
 toolkit/xre/nsAppRunner.cpp | 9 +++++++++
 toolkit/xre/nsAppRunner.h   | 3 +++
 2 files changed, 12 insertions(+)

diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index f0cdd41..81f949a 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4680,6 +4680,8 @@ XREMain::XRE_mainRun()
 
   OverrideDefaultLocaleIfNeeded();
 
+  UseUTCTimeZoneIfNeeded();
+
 #ifdef MOZ_CRASHREPORTER
   nsCString userAgentLocale;
   // Try a localized string first. This pref is always a localized string in
@@ -5385,3 +5387,10 @@ OverrideDefaultLocaleIfNeeded() {
     setlocale(LC_ALL, "C.UTF-8") || setlocale(LC_ALL, "C");
   }
 }
+
+void
+UseUTCTimeZoneIfNeeded() {
+  if (mozilla::Preferences::GetBool("privacy.use_utc_timezone", false)) {
+    SaveToEnv("TZ=UTC");
+  }
+}
diff --git a/toolkit/xre/nsAppRunner.h b/toolkit/xre/nsAppRunner.h
index c7048e0..cab42a4 100644
--- a/toolkit/xre/nsAppRunner.h
+++ b/toolkit/xre/nsAppRunner.h
@@ -96,6 +96,9 @@ WriteConsoleLog();
 void
 OverrideDefaultLocaleIfNeeded();
 
+void
+UseUTCTimeZoneIfNeeded();
+
 #ifdef XP_WIN
 void
 UseParentConsole();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits