Cross posted from my personal blog.
When I was trying out all the different parts of the LinkIt, I wondered if there was an RTC onboard. Loovee told me there was, but that the example was not complete at this point in time. I took this situation upon myself to make a complete example for anyone else out there who wants to use the LinkIt’s onboard RTC. In this discovery of things, I found that the RTC can be set back to 1/1/2004 if the battery and USB power supply are both disconnected. I made a loop in my code that will turn on the GPS to resync the GMT automatically in the background, the only thing that needs to happen is for the GPS to turn on. This is why in my more complex programs, I didn't see the resetting behavior. Here is a screenshot of what it looks like when the GPS has finally synced the time: