diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-01 07:58:48 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-02 16:21:44 -0400 |
commit | 21ddac140e3040b2693c1a5558a84c19a879c04f (patch) | |
tree | 91e5c815982e9f1823f86f61bc49e28d948d1b4c /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c | |
parent | fc7ceae0d5b7a017c3fed88a8bfe2eb3d24058a9 (diff) |
dm: rtc: Try to handle the localtime() race
At present the sandbox timer uses localtime() which can jump around twice
a year when daylight-saving time changes.
It would be tricky to make use of gmtime() since we still need to present
the time in local time, as seems to be required by U-Boot's RTC interface.
The problem can only happen once, so use a loop to detect it and try
again. This should be sufficient to detect either a change in the 'second'
value, or a daylight-saving change. We can assume that the latter also
incorporates a 'second' change, so there is no need to loop more than
twice.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c')
0 files changed, 0 insertions, 0 deletions