diff options
| author | 2017-03-23 14:14:19 +0000 | |
|---|---|---|
| committer | 2017-03-23 14:14:19 +0000 | |
| commit | 302b7a70751fc0ee0f73f1464afb54be435dfa21 (patch) | |
| tree | 87daeb11c51684fd0403189750035ebb4f42fbb9 | |
| parent | fa69eeac5cddfe242c633cbe0c4eabece7569725 (diff) | |
| parent | 20e020536ebf999c4acb759960ae6e4bfff6ba67 (diff) | |
Merge "Default 'persist.sys.timezone' property to GMT if not set on init."
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index de4a55bc8d6a..c907cf33c556 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -235,6 +235,15 @@ public final class SystemServer { SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME); } + // + // Default the timezone property to GMT if not set. + // + String timezoneProperty = SystemProperties.get("persist.sys.timezone"); + if (timezoneProperty == null || timezoneProperty.isEmpty()) { + Slog.w(TAG, "Timezone not set; setting to GMT."); + SystemProperties.set("persist.sys.timezone", "GMT"); + } + // If the system has "persist.sys.language" and friends set, replace them with // "persist.sys.locale". Note that the default locale at this point is calculated // using the "-Duser.locale" command line flag. That flag is usually populated by |