Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c5d9dec authored by Conley Owens's avatar Conley Owens Committed by Android Git Automerger
Browse files

am 587e9563: am c1b62e3b: am bf5adfa5: Merge "Check if we are in daylight time...

am 587e9563: am c1b62e3b: am bf5adfa5: Merge "Check if we are in daylight time when calculating timezone"

* commit '587e9563':
  Check if we are in daylight time when calculating timezone
parents ef716baa 587e9563
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -255,10 +255,7 @@ class AlarmManagerService extends IAlarmManager.Stub {
            
            // Update the kernel timezone information
            // Kernel tracks time offsets as 'minutes west of GMT'
            int gmtOffset = zone.getRawOffset();
            if (zone.inDaylightTime(new Date(System.currentTimeMillis()))) {
                gmtOffset += zone.getDSTSavings();
            }
            int gmtOffset = zone.getOffset(System.currentTimeMillis());
            setKernelTimezone(mDescriptor, -(gmtOffset / 60000));
        }

@@ -759,9 +756,8 @@ class AlarmManagerService extends IAlarmManager.Stub {
                // based off of the current Zone gmt offset + userspace tracked
                // daylight savings information.
                TimeZone zone = TimeZone.getTimeZone(SystemProperties.get(TIMEZONE_PROPERTY));
                int gmtOffset = (zone.getRawOffset() + zone.getDSTSavings()) / 60000;

                setKernelTimezone(mDescriptor, -(gmtOffset));
                int gmtOffset = zone.getOffset(System.currentTimeMillis());
                setKernelTimezone(mDescriptor, -(gmtOffset / 60000));
            	scheduleDateChangedEvent();
            }
        }