关于安卓手机app开发中时区设置

安卓开发app有时候存在时区的设置,可能有时候这样设置时区

AlarmManager mAlarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);

mAlarmManager.setTimeZone("GMT+08:00");

导致其他应用时间发生错乱,可以修改这样设置时区,或许可以解决问题

TimeZone chinaTimeZone = TimeZone.getTimeZone("GMT+8");

TimeZone.setDefault(chinaTimeZone);

你可能感兴趣的:(关于安卓手机app开发中时区设置)