You are reading a single comment by @cwilt and its replies. Click here to read the full conversation.
  • I got it to work.

    var timeS;
    require("http").get("http://www.timeapi.­org/utc/7+hours+ago?\\s", function(res) {
      res.on('data', function(data) {
        console.log("HTTP> "+data);
        timeS=Number(data);
      });
      res.on('close', function(data) {
        console.log("Connection closed");
        setTime(timeS);
      });
    });
    
About

Avatar for cwilt @cwilt started