You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'll try and sort out a fix for Gadgetbridge. So it looks like there are three issues here:

    • Gadgetbridge is setting time regardless of what the setting is set to
    • Gadgetbridge doesn't update the timezone in settings
    • The timezone used by Gadgetbridge is different to that used by the web browser - I'm not entirely sure what to do here. I use Android's TimeZone.getDefault().getRawOffset(). Any thoughts on this?
  • So according to this: https://www.tutorialspoint.com/java/util­/java_util_timezone.htm

    abstract int getRawOffset()
    This method returns the amount of time in milliseconds to add to UTC to get standard time in this time zone.

    So getRawOffset() should give (for my timezone) +1 right. But because of daylight saving it should be +2.

    So there is another method getDSTSaving()

    int getDSTSavings()
    This method returns the amount of time to be added to local standard time to get local wall clock time.

    Maybe a simple RawOffset+DSTSavings is enough?

    E.setTimeZone("+((TimeZone.getDefault().­getRawOffset()+TimeZone.getDefault().get­DSTSavings())/3600000)
    

    But despite that the first really helpful fix would be for GB not setting the time at all if disabled in GB settings.

About

Avatar for Gordon @Gordon started