diff --git a/docs/library/pyb.RTC.rst b/docs/library/pyb.RTC.rst index 2628554526..1a1df90951 100644 --- a/docs/library/pyb.RTC.rst +++ b/docs/library/pyb.RTC.rst @@ -31,7 +31,7 @@ Methods With no arguments, this method returns an 8-tuple with the current date and time. With 1 argument (being an 8-tuple) it sets the date - and time. + and time (and ``subseconds`` is reset to 255). .. only:: port_pyboard diff --git a/ports/stm32/rtc.c b/ports/stm32/rtc.c index 744fbe8b96..4134037124 100644 --- a/ports/stm32/rtc.c +++ b/ports/stm32/rtc.c @@ -529,7 +529,6 @@ mp_obj_t pyb_rtc_datetime(size_t n_args, const mp_obj_t *args) { time.Hours = mp_obj_get_int(items[4]); time.Minutes = mp_obj_get_int(items[5]); time.Seconds = mp_obj_get_int(items[6]); - time.SubSeconds = rtc_us_to_subsec(mp_obj_get_int(items[7])); time.TimeFormat = RTC_HOURFORMAT12_AM; time.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; time.StoreOperation = RTC_STOREOPERATION_SET;