①补充:jre,jdk版本不一致,jvm没有很好识别操作系统,无法取得系统时区。就用默认时区
用这个确认下是不是不知道os版本:
Properties props=System.getProperties();
Iterator iter=props.keySet().iterator();
while(iter.hasNext())
{
String key=(String)iter.next();
System.out.println(key+" = "+ props.get(key));
}
主要是:
os.name = Windows XP
user.timezone = Asia/Shanghai
我的运行结果:
os.name = Windows NT (unknown)
user.timezone = GMT
和上面的不一致啊 请问怎么改啊?
用这个确认下是不是不知道os版本:
Properties props=System.getProperties();
Iterator iter=props.keySet().iterator();
while(iter.hasNext())
{
String key=(String)iter.next();
System.out.println(key+" = "+ props.get(key));
}
主要是:
os.name = Windows XP
user.timezone = Asia/Shanghai
我的运行结果:
os.name = Windows NT (unknown)
user.timezone = GMT
和上面的不一致啊 请问怎么改啊?
请问是添加吗?
请问是什么原因啊 难道是 Myeclipse 的原因?
格林威治时间
GMT(这是用 Myeclipse 自带的服务器 晚了 8 个小时 而且还是 12小时日志的)用tomcat 6.0 做服务器就是本地的系统时间。
请问是什么原因啊 难道是 Myeclipse 的原因?