Free Real Time Clock

If you have read the previous pages you may have noticed that with every heartbeat or triggerevent sent, ChipChop returns an acknowledgement receipt message that looks like this

{"status":"OK","timestamp":1668870714611}
And this is where shit gets interesting

The value of the timestamp is the correct UNIX timestamp in milliseconds for the timezone where your device is located!

If you've paid attention when setting up your devices in the Development Console you had a dropdown list to choose the Timezone for your device. ChipChop uses internally the IANA database to continously re-calculate the timestamps for every device.

Any actions that are time dependant will be executed correctly based on the device timezone.

So, in essence, if you want to show accurate time on your device all you need to do is translate this UNIX timestamp received into a humanly readable date and time. You don't need to connect to any other time provider or use a battery operated RTC.

This functionality took months to implement and I still get a nervous twitch when I hear the word "Time Zone"!!!