summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266
diff options
context:
space:
mode:
Diffstat (limited to 'docs/esp8266')
-rw-r--r--docs/esp8266/quickref.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index 95ae55b570..a50e3dd6b5 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -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
---------------