You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I have some things here that do this, and it works fine for me:

            require("http").get("http://192.168.1.10­1", function(res) {
              console.log("Response: ",res);
              if ("Date" in res.headers) {
                console.log("Got Date ",res.headers.Date); 
                var date = new Date(res.headers.Date);
                var d = date.getTime();
                if (date.getMonth()>2/*Mar*/ && date.getMonth()<=9/*Oct*/)
                  d += 1000*3600; // 1 hour daylight saving
                if (d>0) setTime(d/1000);
                else console.log("Unable to parse date!");
              }
            });
    

    It just pulls the date field right off the HTTP headers, so all you need is a standard HTTP server.

About

Avatar for Gordon @Gordon started