TimeZone.setDefault changes in JDK6

后端 未结 3 576
不知归路
不知归路 2020-12-06 00:44

I just noticed that JDK 6 has a different approach to setting a default TimeZone than JDK5.

Previously the new default would be stored in a thread-local variable. W

3条回答
  •  萌比男神i
    2020-12-06 01:35

    Searching the bugs database was actually quite a good idea :)

    http://bugs.sun.com/view_bug.do?bug_id=6352812

    and also (re docs):

    http://bugs.sun.com/view_bug.do?bug_id=6181786

    Summary: JDK 1.5 was an exception to the rule, with JDK 1.6 things are back to 'normal', which, according to the docs, is that a timezone change is VM wide.

提交回复
热议问题