<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Stack Core2 micropython RTC example]]></title><description><![CDATA[<p dir="auto">Hi friends,<br />
after many tests, I finally understood the curiosity of the RTC of my core2 :</p>
<p dir="auto">machine.RTC().datetime have not the same params that utime.localtime()</p>
<pre><code>
machine.RTC().datetime((2021, 3, 21, 0, 16, 37, 0, 0)) # Y,m,d,0,H,s,i,0
utime.sleep_ms(100) # breathe a little
lcd.print(str(machine.RTC().datetime())+"\n") # print Y,m,d,w,H,s,i,timestamp
lcd.print(str(utime.localtime())) # print Y,m,d,H,s,i,w,z

</code></pre>
<p dir="auto">It's not the same thing that official micropython documentation,<br />
to set RTC, use particular tuple (year , month, day, week=0, hour, minute, second, timestamp=0)</p>
<p dir="auto">regards<br />
thomas</p>
]]></description><link>https://community.m5stack.com/topic/3108/m5stack-core2-micropython-rtc-example</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 01:31:50 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3108.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 Mar 2021 15:56:28 GMT</pubDate><ttl>60</ttl></channel></rss>