The ntptime module documenation is confusing?
Posted: Mon Aug 15, 2022 2:16 am
The top section states that UTC is used. But later the default timezone is set to 8? Eastern Eight District? And when, on Pico I try to set the timezone=0, I get 'unexpected keyword argument 'timezone'... Color me confused.
How do I force ntptime.settime() method to maintain UTC? Which is what NTP servers return,
Reference https://mpython.readthedocs.io/en/maste ... ptime.html...
ntptime — Time synchronization
This module is used for time synchronization, providing accurate time, International Standard Time (UTC).
what is NTP
Network Time Protocol (NTP) is a protocol used to synchronize the time of the computer. It can synchronize the computer to its server or clock source (such as quartz clock, GPS, etc.). It can provide highly precise time calibration.
Method
ntptime.settime(timezone=8, server = 'ntp.ntsc.ac.cn')
Synchronize local time
timezone - Time zone time difference, the default is East Eight District, compensation 8 hours
server - You can specify the time server yourself, server is a string type. The default time server is “ntp.ntsc.ac.cn” .
How do I force ntptime.settime() method to maintain UTC? Which is what NTP servers return,
Reference https://mpython.readthedocs.io/en/maste ... ptime.html...
ntptime — Time synchronization
This module is used for time synchronization, providing accurate time, International Standard Time (UTC).
what is NTP
Network Time Protocol (NTP) is a protocol used to synchronize the time of the computer. It can synchronize the computer to its server or clock source (such as quartz clock, GPS, etc.). It can provide highly precise time calibration.
Method
ntptime.settime(timezone=8, server = 'ntp.ntsc.ac.cn')
Synchronize local time
timezone - Time zone time difference, the default is East Eight District, compensation 8 hours
server - You can specify the time server yourself, server is a string type. The default time server is “ntp.ntsc.ac.cn” .