TimeZone timeZone = TimeZone.getDefault(); System.out.println(timeZone.getDisplayName()); System.out.println(timeZone.getID()); // 中国标准时间 // Asia/Shanghai2. System.getProperty(“user.timezone”)
String property = System.getProperty("user.timezone");
System.out.println(property);
// // Asia/Shanghai
// 有时候不起作用,未找到原因



