-->
Page 1 of 1

Is gmtime broken?

PostPosted: Tue Feb 08, 2022 1:04 pm
by Mark Hickman
I have been using gmtime() to update a struct tm object successfully over the past year on an Arduino ESP8266 project. While recently modifying the project and after updating libraries gmupdate() now fails to properly update the struct tm past the tm_sec field on any call to the function including gmupdate() after the first call. Said differently, the first use of gmupdate() properly fills in tm_year, tm_mon, tm_mday and, presumably the remaining fields. Any subsequent call causes these fields to not be properly updated per the time_t value passed by reference to it. the values stored on subsequent calls are repeatable upon each reset of the processor.

I am in the process of determining which version of time.h is loaded but my skills in this area are only developing. I am open to any suggestions as to how better troubleshoot this problem.

Thanks.

Re: Is gmtime broken?

PostPosted: Thu Feb 10, 2022 8:16 am
by rpiloverbd
Hi, which version of Arduino IDE are you using?