-
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().getDSTSavings())/3600000)
But despite that the first really helpful fix would be for GB not setting the time at all if disabled in GB settings.
I'll try and sort out a fix for Gadgetbridge. So it looks like there are three issues here:
TimeZone.getDefault().getRawOffset()
. Any thoughts on this?