用Swing显示时间比实际的晚8小时解决方法
参考文章:http://blog.csdn.net/subchen/archive/2008/04/18/2303402.aspx
在main中调用:
System.setProperty(“user. timezone”, “GMT+8″);
不起作用
改为
TimeZone.setDefault(TimeZone.getTimeZone("ETC/GMT-8"));
时间显示正确
–EOF–
参考文章:http://blog.csdn.net/subchen/archive/2008/04/18/2303402.aspx
在main中调用:
System.setProperty(“user. timezone”, “GMT+8″);
不起作用
改为
TimeZone.setDefault(TimeZone.getTimeZone("ETC/GMT-8"));
时间显示正确
–EOF–