settings.cpp: show current time before applying time provided with set date
To see clock drift over time.
This commit is contained in:
parent
b81bcd4006
commit
c6b832a0bc
|
@ -696,6 +696,7 @@ void printDateTime() {
|
|||
|
||||
void setDateTime(const char * const isoDateTime) {
|
||||
#if EFI_RTC
|
||||
printRtcDateTime();
|
||||
if (strlen(isoDateTime) >= 19 && isoDateTime[10] == 'T') {
|
||||
efidatetime_t dateTime;
|
||||
dateTime.year = atoi(isoDateTime);
|
||||
|
@ -712,6 +713,8 @@ void setDateTime(const char * const isoDateTime) {
|
|||
dateTime.second <= 59) {
|
||||
// doesn't concern about leap years or seconds; ChibiOS doesn't support (added) leap seconds anyway
|
||||
setRtcDateTime(&dateTime);
|
||||
efiPrintf("Time is changed to");
|
||||
printRtcDateTime();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue