← index #3523Issue #3766
Related · high · value 2.709
QUERY · ISSUE

esp8266/modules/ntptime: More accurate NTP syncing

openby puhitakuopened 2017-12-28updated 2024-09-19
enhancementport-esp8266

At present ntptime doesn't care about sub-second part (fraction part of NTP reply.)

I've wrote some lines which handles it and syncs RTC milliseconds-accurate.
https://github.com/puhitaku/micropython/commit/5dd5bed21677250f1b26da2a48558b03c08d9ca1

I think it won't make any incompatibility even if I change this API to set millis implicitly because utime.datetime doesn't care about millis but I can't guarantee it so it's why I adopted kwarg.

Takumi

CANDIDATE · ISSUE

esp8266: remove print statement in ntptime

closedby triplepointopened 2018-05-06updated 2018-06-05
port-esp8266

There's a print statement here on line 36:
https://github.com/micropython/micropython/blob/master/ports/esp8266/modules/ntptime.py#L36

which it is not possible to avoid. I think we could just remove it, but at the very least we should replace that line with

return utime.localtime()

And let the calling code decide if they want to print it or not.

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