Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 3 months ago.
How do you update time with set_time() more than once?
I would like to use a GSM module to update the time on my MAX32620FTHR periodically, let's say once every minute, and use this value. However when I use set_time() it only works the first time it's called. Any future calls do not update the time or reset it. I tried looking up an explanation of how set_time() works in the documentation but could not find anything which describes why I'm having this problem. Can you only call set_time() once in your program? Any suggestions on how to use set_time() repeatedly in a program would be very helpful. Thanks in advance for any advice people can give.
1 Answer
6 years, 3 months ago.
Hi Jordan,
You can call set_time() more than once. It's possible that you are being impacted by this issue that was recently uncovered:
And there is a (one-line) proposed fix available here:
Could you please introduce this pull request into your code and see if that fixes things?
Regards,
Ralph, Team Mbed