Banglejs2 hour out of sync

Posted on
  • The day I got my bangle I set it to a 24 hour clock and set the time and date, the next morning at 08:00 it was showing 06:00, I set the time again and looked at the clock later that afternoon, now the time was around 14:00 but my bangle was showing around 15:00, I set the time again, it's a few days later and I am writing this at 23:08 and noticed that my Bangle is showing 22:08, something is not right with the internal time keeping thingy, does anyone have any ideas as to what I can do to fix it? :)

  • Is your firmware up to date? It can be a sign that the Bangle's .boot0 file got corrupted (you can fix it with Settings->Utils->Rewrite settings but on 2v13 firmware and later that shouldn't be an issue.

    Also, are you connected to Gadgetbridge? Gadgetbridge will attempt to set the Bangle's time (and timezone) to what your phone's is, and I guess that could be causing you problems?

  • Thank you for the prompt reply :)
    I am on
    Version 2v13
    Commit e69c9990f

    I'm not on gadget bridge, I had however had it connected to the web IDE from time to time, though I didn't notice if that's when it changed, the clock locally on the PC is running correctly at least, so that's probably not the source of the error unless the web IDE is somehow setting the time based on some external source..?

  • Ah, that was it, I just

    • Flashed it
    • checked the time, date timezone etc
    • connected to the web IDE
    • uploaded code

    When I and went back to the main screen and the time was off by an hour.
    I'm assuming the timezone is in GMT?

    The code I uploaded btw was just

    setWatch(() => {
      Bangle.buzz();
      E.showMessage("You\npressed\nthe button!");
      setTimeout(()=>g.clear(), 1000);
    }, BTN1, {repeat:true});
    

    I doubt the code itself matters though.

  • Argh. Ok, that's interesting! Well, if you turn off "Set Current Time" in Communication Settings in the IDE, that should fix it.

    But I'm still confused... If you click Set Time in the Bangle.js App loader, is the time set correctly?

    Here are the two bits of code that set the time:

    To me, they look like they should be doing exactly the same thing in each case. I'd be really interested to know what happens if you pull up chrome devtools and type (new Date()).getTimezoneOffset()/-60 on your PC and whether that's different from the timezone you expect.

  • Ah, yup in both Chrome, Edge and Firefox
    (new Date()).getTimezoneOffset()/-60 = 2
    That's not my timezone though, my timezone is GMT+1, which is also what I get if I print the same thing in the espruino terminal.
    Interestingly I can see that my system (windows 10) timezone is set to +1, as it should be.
    It's rather weird but certainly explains the issue, seems to be an issue with the computer rather than with bangle at least :)

  • Argh. Ok, then I'd guess for now just disable "Set Current Time" in the IDE. I'd be interested to know if anyone else has this issue - I always thought asking the Web Browser would be a reasonably failsafe solution!

    Interestingly the App Loader checks the time (but not timezone) and resets it if it is wrong, so I wonder whether if I made it check timezone too, more people would report problems

  • I'm wondering if this could actually be related to summer/winter (daylight saving) time, as it's now summer, for all intents and purposes we are currently acting as GMT +2, but officially we are in GMT +1.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Banglejs2 hour out of sync

Posted by Avatar for TheLogan @TheLogan

Actions