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

Commit 587e9563 authored by Conley Owens's avatar Conley Owens Committed by Android Git Automerger
Browse files

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

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


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

                setKernelTimezone(mDescriptor, -(gmtOffset / 60000));
                setKernelTimezone(mDescriptor, -(gmtOffset));
            	scheduleDateChangedEvent();
            	scheduleDateChangedEvent();
            }
            }
        }
        }