系统时间已经是东八时区, 但是 openjdk 中时区仍然是 UTC, 多谢
1
ma6254 2017-07-08 11:28:43 +08:00 via Android
手动加 8 小时吧
|
2
Betacoefficient 2017-07-08 11:57:08 +08:00
dick,大佬
你要不把 UTC 改为 CST 吧。 |
3
sagaxu 2017-07-08 12:04:38 +08:00
@Betacoefficient CST 在 JDK 中是美国某个时区
|
4
Betacoefficient 2017-07-08 12:12:09 +08:00
@sagaxu。。你好专业啊
美国中部时间:Central Standard Time (USA) UT-6:00 澳大利亚中部时间:Central Standard Time (Australia) UT+9:30 中国标准时间:China Standard Time UT+8:00 古巴标准时间:Cuba Standard Time UT-4:00 貌似不单独是美国时间吧,可以自己调整的吧。 |
5
sagaxu 2017-07-08 12:56:19 +08:00 1
@Betacoefficient JDK 代码里写死了,CST 就是芝加哥时间,你自己如何调整?
private static String[][] oldMappings = new String[][]{{"ACT", "Australia/Darwin"}, {"AET", "Australia/Sydney"}, {"AGT", "America/Argentina/Buenos_Aires"}, {"ART", "Africa/Cairo"}, {"AST", "America/Anchorage"}, {"BET", "America/Sao_Paulo"}, {"BST", "Asia/Dhaka"}, {"CAT", "Africa/Harare"}, {"CNT", "America/St_Johns"}, {"CST", "America/Chicago"}, {"CTT", "Asia/Shanghai"}, {"EAT", "Africa/Addis_Ababa"}, {"ECT", "Europe/Paris"}, {"IET", "America/Indiana/Indianapolis"}, {"IST", "Asia/Kolkata"}, {"JST", "Asia/Tokyo"}, {"MIT", "Pacific/Apia"}, {"NET", "Asia/Yerevan"}, {"NST", "Pacific/Auckland"}, {"PLT", "Asia/Karachi"}, {"PNT", "America/Phoenix"}, {"PRT", "America/Puerto_Rico"}, {"PST", "America/Los_Angeles"}, {"SST", "Pacific/Guadalcanal"}, {"VST", "Asia/Ho_Chi_Minh"}}; |
6
privil 2017-07-08 13:10:46 +08:00
@Betacoefficient 所以我都用 HKT,这个是常识
|