Java时区及夏令时的自动处理

/*
* US/Central
* US/Eastern
* US/Mountain
* US/Pacific
* Asia/Shanghai
* 给SimpleDateFormat正确的时区,Java会自动判断夏令时
* */
TimeZone tz = TimeZone.getTimeZone(“US/Central”);
SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);
sdf.setTimeZone(tz);
System.out.println(sdf.format(new Date()));
System.out.println(tz.inDaylightTime(new Date()));