Skip to content

Commit f3b5da0

Browse files
committed
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.
1 parent 5855906 commit f3b5da0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/components/datetime/DateTimeController.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ using namespace Pinetime::Controllers;
77

88
void DateTime::SetCurrentTime(std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> t) {
99
this->currentDateTime = t;
10+
UpdateTime(previousSystickCounter); // Update internal state without updating the time
1011
}
1112

1213
void DateTime::SetTime(

0 commit comments

Comments
 (0)