Merge change I69324a33 into eclair
* changes:
AlarmManagerService: Fix daylight savings time offset computation
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.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 @@
// 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);