Edit: the epoch service is down. There are so many alternative ways to do something like this.
http://tiwtieapp.azurewebsites.net/now?format=json
This will return the server time. No padding, no trimming, just the time! Neat, right? I've contacted the owner of epo.ch, but haven't had a response yet.
So why did I do this?
The OakPowerBoard firmware does HTTP requests anyway, so doing a request to this web service does not cost a lot of extra code. Implementing a bare-bones NTP client is probably a lot more work! And of course, nearly every internet-connected platform has examples for a simple HTTP GET request, this cannot be said for NTP. Enjoy!
No comments:
Post a Comment