Date/Time management

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.

modulusmath
Posts: 30
Joined: Thu Jun 30, 2022 3:21 am

Re: Date/Time management

Post by modulusmath » Fri Aug 05, 2022 2:16 am

stanely wrote:
Thu Mar 12, 2020 1:37 pm
I wrote a clock app for the ESP32 where I messed with time. I got the NTP time and then offset it by timezone. Here's how I set the localtime:

Code: Select all

# Set the RTC to local time.  (I don't think the uP docs are exactly right about this.)
RTC().datetime((yy, mo, dd, 0, hh, mm, ss, 0))
You can see all of the code here: https://github.com/the-stanely/Clock-ESP32-Nokia5110
Thank you for this. I spent so much time chasing this and stumbled here. Thanks for sharing this nice code

Post Reply