例如:夏令营时间(“Sat Aug 01 00:00:00 CDT 1987”)
//TODO CDT时区转换CST时区Date date = new Date(value);TimeZone cdtTZ = TimeZone.getTimeZone("America/Chicago");TimeZone cstTZ = TimeZone.getTimeZone("America/Mexico_City");date.setTime(date.getTime() - cdtTZ.getRawOffset() + cstTZ.getRawOffset());SimpleDateFormat output = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); format = output.format(date);
好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,我是老贺,我们下期见~~