diff options
author | Jean-François Milants <jf@codingfield.com> | 2021-09-19 17:42:50 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2021-09-19 17:42:50 +0200 |
commit | f3b5da0049132f9b06ecc162039badc20e37d037 (patch) | |
tree | c0ab7d78dd3700e20d8c0f85da77589d38e2a5ff /src | |
parent | 5855906e49ce8bc4042e93817c6aba3a70fab089 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/datetime/DateTimeController.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<std::chrono::system_clock, std::chrono::nanoseconds> t) { this->currentDateTime = t; + UpdateTime(previousSystickCounter); // Update internal state without updating the time } void DateTime::SetTime( |