From 5990bc702ca08b5e42a59fd680dfc927e18fa669 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Fri, 11 Feb 2022 13:22:05 +0000 Subject: [PATCH] Switch "UTC time" to "Unix epoch time" (core) This is more correct. Android devices, even under ideal conditions, don't track UTC (which contains leap seconds and uses the SI definition of a second) but use a clock based on Unix epoch time (no leap seconds, but clocks may skip/stop or smear around leap seconds to ensure a fixed number of second increments per calendar day when leap seconds are applied to UTC). Bug: 218802673 Test: Compile only Change-Id: I0c557e2231f87ea1b99e3935f79af15bccf91da4 --- core/java/android/provider/Settings.java | 4 ++-- core/java/android/util/TimeUtils.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 464567b85270..e337e8599d6d 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -11707,8 +11707,8 @@ public final class Settings { "night_display_forced_auto_mode_available"; /** - * If UTC time between two NITZ signals is greater than this value then the second signal - * cannot be ignored. + * If Unix epoch time between two NITZ signals is greater than this value then the second + * signal cannot be ignored. * *

This value is in milliseconds. It is used for telephony-based time and time zone * detection. diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java index 5fd0c33ca205..9a93e1b9e1f9 100644 --- a/core/java/android/util/TimeUtils.java +++ b/core/java/android/util/TimeUtils.java @@ -153,8 +153,8 @@ public class TimeUtils { * *

Time zone database updates should be expected to occur periodically due to * political and legal changes that cannot be anticipated in advance. Therefore, - * when computing the UTC time for a future event, applications should be aware that - * the results may differ following a time zone database update. This method allows + * when computing the time for a future event, applications should be aware that the + * results may differ following a time zone database update. This method allows * applications to detect that a database change has occurred, and to recalculate any * cached times accordingly. *