mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4480 from pan-/fix_time_return
rtc_time: Fix incorrect return value when the calendar is not available.pull/4478/head^2
commit
9122ed60cd
|
@ -53,7 +53,7 @@ time_t time(time_t *timer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t t = 0;
|
time_t t = -1;
|
||||||
if (_rtc_read != NULL) {
|
if (_rtc_read != NULL) {
|
||||||
t = _rtc_read();
|
t = _rtc_read();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue