• co

    g.clear();
    g.drawString("Fetching time...", 120, 120);
    
    Bangle.http("https://worldtimeapi.org/api/ip").then(data => {
      let time = JSON.parse(data).datetime.split("T")[1].split(".")[0];
      g.clear();
      g.drawString("Time: " + time, 120, 120);
    }).catch(err => {
      g.clear();
      g.drawString("Error: " + err, 120, 120);
    });
    

    Uncaught Error: Function "http" not found!
    at line 1 col 8
    Bangle.http("https://worldtimeapi.org/api/ip").then(data => ...

       ^
    

    thankss

About

Avatar for ccchan @ccchan started