日历时区DST问题代号日历

时间:2017-03-14 06:20:42

标签: codenameone

我们使用以下代码来获取时间

Calendar now = Calendar.getInstance();
int hour            = now.get(Calendar.HOUR_OF_DAY);
int minute          = now.get(Calendar.MINUTE);
int amPmVal         = now.get(Calendar.AM_PM);

但是当我们在iPad上将Timezone更改为纽约时,它会减少1小时。

我们能用代号1处理这个DST问题吗?

1 个答案:

答案 0 :(得分:0)

您设置小时但未设置日期,因此DST可能无法生效。还要确保在iPad本身正确设置DST,而不仅仅是小时。

相关问题