diff options
-rw-r--r-- | services/java/com/android/server/AlarmManagerService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/AlarmManagerService.java b/services/java/com/android/server/AlarmManagerService.java index 9c4ace1..8d86219 100644 --- a/services/java/com/android/server/AlarmManagerService.java +++ b/services/java/com/android/server/AlarmManagerService.java @@ -44,6 +44,7 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -260,8 +261,11 @@ class AlarmManagerService extends IAlarmManager.Stub { // Update the kernel timezone information // Kernel tracks time offsets as 'minutes west of GMT' - int gmtOffset = (zone.getRawOffset() + zone.getDSTSavings()) / 60000; - setKernelTimezone(mDescriptor, -(gmtOffset)); + int gmtOffset = zone.getRawOffset(); + if (zone.inDaylightTime(new Date(System.currentTimeMillis()))) { + gmtOffset += zone.getDSTSavings(); + } + setKernelTimezone(mDescriptor, -(gmtOffset / 60000)); } TimeZone.setDefault(null); |