From 5d7279e9ae4d1272c7da159982c82ea879ad7107 Mon Sep 17 00:00:00 2001 From: Damian Krolik Date: Mon, 16 May 2022 13:17:13 +0200 Subject: [PATCH] [nrf fromlist] [zephyr] Fix realtime clock I applied a code review comment only partially and forgot to remove the multiplication. (cherry picked from commit f45e998b9d9c719107f6fb3bf4a02eb5f3aa18c4) --- src/platform/Zephyr/SystemTimeSupport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/Zephyr/SystemTimeSupport.cpp b/src/platform/Zephyr/SystemTimeSupport.cpp index 37f50b8651..3e847e1763 100644 --- a/src/platform/Zephyr/SystemTimeSupport.cpp +++ b/src/platform/Zephyr/SystemTimeSupport.cpp @@ -44,9 +44,9 @@ namespace { // Last known UTC time in Unix format. #ifdef CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_UNIX_TIME -Microseconds64 gRealTime = Seconds64(CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_UNIX_TIME * UINT64_C(1000000)); +Microseconds64 gRealTime = Seconds64(CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_UNIX_TIME); #else -Microseconds64 gRealTime = Seconds64(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD * UINT64_C(1000000)); +Microseconds64 gRealTime = Seconds64(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD); #endif // Monotonic time of setting the last known UTC time.