← index #7137PR #7075
Off-topic · high · value 1.529
QUERY · ISSUE

ntptime.py settime() does not cope with errors

openby peterhinchopened 2021-04-20updated 2022-07-31

This arose in the forum.

If an exception occurs in the time() function, msg is not updated so a value of -NTP_DELTA is returned. If this is the intended mechanism for reporting exceptions, settime() should check for this and avoid updating the RTC.

Or perhaps the finally clause in time() should re-raise the exception?

CANDIDATE · PULL REQUEST

ntptime.py: added simple timezone support.

closedby mishafarmsopened 2021-03-26updated 2023-10-02
port-esp8266

This only adds the ability to have an offset from UTC
so that the RTC can give back localtime correctly.
daylight savings time must be handled by setting the
timezone 3600 second ahead or back.

Signed-off-by: mishafarms github@mishafarms.us

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied