Simon Glass 21ddac140e 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>
2022-09-02 16:21:44 -04:00
..
2022-08-12 08:17:11 -04:00
2022-09-02 13:40:42 -04:00
2022-06-23 12:58:19 -04:00
2022-08-10 13:38:30 -04:00
2022-07-26 02:30:56 -06:00
2022-01-19 18:11:34 +01:00
2022-08-10 13:38:30 -04:00
2022-08-10 13:38:30 -04:00
2022-05-03 21:39:22 +02:00