arduino-libraries / RTCZero

RTC Library for SAMD21 based boards
http://arduino.cc/en/Reference/RTC
GNU Lesser General Public License v2.1
77 stars 78 forks source link

Replace "gmtime()" with its thread-safe version, "gmtime_r()" #51

Closed onelife closed 3 years ago

onelife commented 5 years ago

"gmtime()" doesn't work when together with RTOS library, e.g. RT-Thread.

drewfish commented 3 years ago

I did some test compiles before and after this change. (Both done using platformio for Adafruit Feather M0.) In both cases the elf binary has both the gmtime and gmtime_r symbols, so somewhere in the Arduino framework both are already being used.