2942| 3
|
[求助问答] 掌控板如何获取时间 |
from machine import RTC def RTCdate(flag): rtc = RTC() dt = rtc.datetime() date_str = "{}年{}月{}日".format(dt[0], dt[1], dt[2]) time_str = "{}时:{}分:{}秒".format(dt[4], dt[5], dt[6]) if flag == 0: return date_str else: return time_str |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed