Skip to content

Commit b5de529

Browse files
robert-hhdpgeorge
authored andcommitted
docs: Fix the quickref documentation of rtc.datetime().
Such that it matches the implementation and the documentation of the `machine.RTC` class. Signed-off-by: robert-hh <[email protected]>
1 parent e323da7 commit b5de529

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

docs/esp32/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
577577
from machine import RTC
578578

579579
rtc = RTC()
580-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
580+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
581+
# time, eg. 2017/8/23 1:12:48
582+
# the day-of-week value is ignored
581583
rtc.datetime() # get date and time
582584

583585
WDT (Watchdog timer)

docs/esp8266/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
284284
from machine import RTC
285285

286286
rtc = RTC()
287-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
287+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
288+
# time, eg. 2017/8/23 1:12:48
289+
# the day-of-week value is ignored
288290
rtc.datetime() # get date and time
289291

290292
# synchronize with ntp

docs/mimxrt/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ See :ref:`machine.RTC <machine.RTC>`::
429429
from machine import RTC
430430

431431
rtc = RTC()
432-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
432+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
433+
# time, eg. 2017/8/23 1:12:48
434+
# the day-of-week value is ignored
433435
rtc.datetime() # get date and time
434436
rtc.now() # return date and time in CPython format.
435437

docs/pyboard/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ See :ref:`pyb.RTC <pyb.RTC>` ::
138138
from pyb import RTC
139139

140140
rtc = RTC()
141-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
141+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
142+
# time, eg. 2017/8/23 1:12:48
143+
# the day-of-week value is ignored
142144
rtc.datetime() # get date and time
143145

144146
PWM (pulse width modulation)

docs/renesas-ra/quickref.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
206206
from machine import RTC
207207

208208
rtc = RTC()
209-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
210-
# time, eg 2017/8/23 1:12:48
209+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
210+
# time, eg. 2017/8/23 1:12:48
211+
# the day-of-week value is ignored
211212
rtc.datetime() # get date and time
212213

213214
Following functions are not supported at the present::

docs/rp2/quickref.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
310310
from machine import RTC
311311

312312
rtc = RTC()
313-
rtc.datetime((2017, 8, 23, 2, 12, 48, 0, 0)) # set a specific date and
313+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
314314
# time, eg. 2017/8/23 1:12:48
315+
# the day-of-week value is ignored
315316
rtc.datetime() # get date and time
316317

317318
WDT (Watchdog timer)

0 commit comments

Comments
 (0)