更新后运行JWS应用时,时区设置不正确,重启后应用时区设置正确。
主要方法...
logger.info("TimeZone=" + TimeZone.getDefault());
logger.info("Date=" + new Date());
logger.info("Timestamp=" + new Timestamp(new Date().getTime()));
首次运行(升级后):
2012-10-15 16:51:49,529 [javawsApplicationMain] INFO - TimeZone=sun.util.calendar.ZoneInfo[id="UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
2012-10-15 16:51:49,531 [javawsApplicationMain] INFO - Date=Mon Oct 15 16:51:49 UTC 2012
2012-10-15 16:51:49,531 [javawsApplicationMain] INFO - Timestamp=2012-10-15 16:51:49.531
第二次运行(来自缓存):
2012-10-15 19:52:44,798 [javawsApplicationMain] INFO - TimeZone=sun.util.calendar.ZoneInfo[id="GMT+03:00",offset=10800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
2012-10-15 19:52:44,798 [javawsApplicationMain] INFO - Date=Mon Oct 15 19:52:44 GMT+03:00 2012
2012-10-15 19:52:44,798 [javawsApplicationMain] INFO - Timestamp=2012-10-15 19:52:44.798
有任何想法吗?