TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
c.setTime(date);
Java 使用Calendar 工具类时 设置时区
最新推荐文章于 2023-05-30 22:26:55 发布
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
c.setTime(date);