View Source Whenwhere (Whenwhere v0.1.2)
A small utility for fetching data from a Whenwhere server.
The primary task of Whenwhere is to get the rough time. A more reliable and resilient option to NTP.
As a bonus and due to cheap AWS functionality it also includes some GeoIP functionality. Best effort information about the location of the device.
You can set up your own using the information available here. If you do set one up and are willing to share it, let us know.
Summary
Functions
This function requests whenwhere data over plain HTTP by default.
If switched to https:// it will attempt to verify CA and all that good stuff.
The convenient way to do HTTPS is with asks/0
.
The reason to use plain HTTP is that it will work for embedded devices that are out of whack with their clock.
A nonce is generated and sent to the server to prevent captive portals from tricking the device, bust caches and generally increase the likelihood that we are talking to the right server.
Attempts to fetch whenwhere data with HTTPS, so with TLS encryption and CA-checking.
See ask/1
for more detail.