當我在同一臺機器上編譯並運行以下代碼語句時,我得到兩個不同的時區值。每個JDK版本的時區值更改
public class TimeZoneDemo {
public static void main(String args[]){
// create time zone object
TimeZone timezone = TimeZone.getDefault();
// checking time zone value
System.out.println(timezone);
}
}
JDK 35年6月1日
Tue Sep 24 06:25:03 VET 2013
sun.util.calendar.ZoneInfo[id="America/Caracas",offset=-16200000,dstSavings=0,useDaylight=false,transitions=5,lastRule=null]
JDK 02年7月1日
Tue Sep 24 22:56:54 MAGT 2013
sun.util.calendar.ZoneInfo[id="Asia/Magadan",offset=43200000,dstSavings=0,useDaylight=false,transitions=66,lastRule=null]
OS:窗口7 64位。
你用什麼機器,用哪個操作系統? (Windows,Mac,Linux,...) – Joni
您在機器上配置的實際位置是什麼? –
Windows 7 64位。 –