docs/esp8266: Add ntptime usage to esp8266 quickref.

pull/5221/head
Mike Causer 2019-02-13 03:20:23 +11:00 zatwierdzone przez Damien George
rodzic c0b3419261
commit 5a8f392f09
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -243,6 +243,12 @@ See :ref:`machine.RTC <machine.RTC>` ::
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
rtc.datetime() # get date and time
# synchronize with ntp
# need to be connected to wifi
import ntptime
ntptime.settime() # set the rtc datetime from the remote server
rtc.datetime() # get the date and time in UTC
Deep-sleep mode
---------------