--- a/src/eric7/MicroPython/MicroPythonCommandsInterface.py Sun Feb 12 15:14:28 2023 +0100 +++ b/src/eric7/MicroPython/MicroPythonCommandsInterface.py Sun Feb 12 18:11:20 2023 +0100 @@ -973,6 +973,20 @@ " rtc.datetime(rtc_time[:7] + (0,))", ] ) + elif deviceType == "teensy": + # The pyb.RTC.datetime function takes the arguments in the + # order: (year, month, day, weekday, hour, minute, second, + # subseconds) + # https://docs.micropython.org/en/latest/library/machine.RTC.html + # #machine-rtc + set_time = "\n".join( + [ + "def set_time(rtc_time):", + " import machine", + " rtc = machine.RTC()", + " rtc.init(rtc_time[:7] + (0,))", + ] + ) elif deviceType == "esp": # The machine.RTC documentation was incorrect and doesn't agree # with the code, so no link is presented here. The order of the