Help setting the time
Posted: Wed Oct 20, 2021 8:42 pm
I'm using an ESP32 to make a clock, so I need a way to get the current time and keep track of daylights savings, leap year etc. I'll have the ESP connected to wifi, so I could fetch the time from NTP somehow (side note: not sure if I can use this library or if mpython is different than micropython). I don't know what to do with that time though since it's just time since epoch.
I believe the ESP32 has an RTC and I see machine.RTC. As far as timezone, do I just need a way to prompt the user for tzinfo? I can do that by setting up a simple web server.
I think I'm dancing around a solution but don't really know how to fit it all together. Thanks for the help!
I believe the ESP32 has an RTC and I see machine.RTC. As far as timezone, do I just need a way to prompt the user for tzinfo? I can do that by setting up a simple web server.
I think I'm dancing around a solution but don't really know how to fit it all together. Thanks for the help!