更改时区后如何刷新hutool自己维护的时区 #3570
Replies: 1 comment
-
因为Hutool中的DatePattern使用了缓存,一旦创建并不能感知系统的时区变更, 考虑自己创建DateFormat( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
在项目中更改了时区,不重启服务的情况下无法刷新hutool维护的那份时区,调用hutool的时间相关的部分API依旧用的是更改前的时区,也没有找到API去重新赋值刷新
DateUtil.format(Date date, String format)使用的是更改后的时区,DateUtil.formatDateTime(Date date)使用的是更改前的时区
Beta Was this translation helpful? Give feedback.
All reactions