Android Daylight savings time设置问题
来源:互联网 发布:杭州软件行业排名 编辑:程序博客网 时间:2024/05/29 14:16
Android中对 Daylight savings time的处理是根据时区来处理的。
framework/com/android/server/AlarmManagerService.java有说明。
TimeZone zone = TimeZone.getTimeZone(tz);
261
// Prevent reentrant calls from stepping on each other when writing
262
// the time zone property
263
boolean
timeZoneWasChanged =
false
;
264
synchronized
(
this
) {
265
String current = SystemProperties.get(TIMEZONE_PROPERTY);
266
if
(current ==
null
|| !current.equals(zone.getID())) {
267
if
(localLOGV) Slog.v(TAG,
"timezone changed: "
+ current +
", new="
+ zone.getID());
268
timeZoneWasChanged =
true
;
269
SystemProperties.set(TIMEZONE_PROPERTY, zone.getID());
270
}
271
272
// Update the kernel timezone information
273
// Kernel tracks time offsets as 'minutes west of GMT'
274
int
gmtOffset = zone.getRawOffset();
275
if
(zone.inDaylightTime(
new
Date(System.currentTimeMillis()))) {
276
gmtOffset += zone.getDSTSavings();
277
}
278
setKernelTimezone(mDescriptor, -(gmtOffset /
60000
));
279
}
280
281
TimeZone.setDefault(
null
);
- Android Daylight savings time设置问题
- Daylight Savings Time (DST)
- TimeZone里的daylight savings
- TimeZone里的daylight savings
- daylight saving time
- HDU6010-Daylight Saving Time
- L Daylight Saving Time(模拟)
- HDU-6010-Daylight Saving Time
- 关于夏时制(DST)的问题和研究 - About Daylight Saving Time
- Oracle与DST(daylight saving time)
- 闲扯 DST (Daylight Saving Time) 与 Oracle
- No daylight saving time now(遇到奇怪的夏令时)
- 夏令时 DST (Daylight Saving Time) java中的夏令时。
- 夏令时【Daylight Saving Time】时间计算出错的解决办法
- A survey of 1,133 engineers on HLS vs. manual RTL time savings
- java开发1:用Calender来解决夏令时(daylight saving time )等引起的错误
- HDU 6010 Daylight Saving Time【打表+结构体内重载操作符】
- Use run-time library 设置问题
- js将onclick 放到js文件中
- Windows7下修改驱动器号或卷标
- javascript控制html里的元素样式
- Windows 下 使用TortoiseGit GitHub
- 简单选择排序(Simple Selection Sort)
- Android Daylight savings time设置问题
- state代替if-else
- ORACLE分区表的使用和管理
- GetView()原理
- Socket网络编程
- Centos_DHCP+NAT.sh
- 三相异步电动机矢量控制机械特性曲线?
- android4.0 开机启动
- java字符串的各种编码转换