summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266
diff options
context:
space:
mode:
authorMike Causer <mcauser@gmail.com>2019-02-13 03:20:23 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-16 14:08:13 +1100
commit5a8f392f09e3826ff2a1f4330700198e9c0d42cc (patch)
tree36161adc482ee0398db62ff8303cd62ddd216dd8 /docs/esp8266
parentc0b3419261a7fa373d9d6f07d4bef55d019d52b9 (diff)
downloadmicropython-5a8f392f09e3826ff2a1f4330700198e9c0d42cc.tar.gz
micropython-5a8f392f09e3826ff2a1f4330700198e9c0d42cc.zip
docs/esp8266: Add ntptime usage to esp8266 quickref.
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
---------------