From f3b5da0049132f9b06ecc162039badc20e37d037 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 19 Sep 2021 17:42:50 +0200 Subject: Fix the display of the date after a reset : when the date/time was restored from the noinit area, the date was displayed as "--" instead of the actual date. This issue was caused by DateTime::SetCurrentTime() that would not update the internal state of the class : dayOfWeek, Month, Year were not properly updated according to the current time. --- src/components/datetime/DateTimeController.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp index 6e426825..0756d38d 100644 --- a/src/components/datetime/DateTimeController.cpp +++ b/src/components/datetime/DateTimeController.cpp @@ -7,6 +7,7 @@ using namespace Pinetime::Controllers; void DateTime::SetCurrentTime(std::chrono::time_point t) { this->currentDateTime = t; + UpdateTime(previousSystickCounter); // Update internal state without updating the time } void DateTime::SetTime( -- cgit v1.2.3