♻️ Refactoring code.显式指定时区,避免执行环境影响
This commit is contained in:
1 parent
93e8c14766
commit
5b32422491
1 file changed
+1
-1
+1
-1
@@ -30,7 +30,7 @@ public class JacksonConfig {
|
||||
public Jackson2ObjectMapperBuilderCustomizer customizer() {
|
||||
return builder -> {
|
||||
builder.locale(Locale.CHINA);
|
||||
builder.timeZone(TimeZone.getTimeZone(ZoneId.systemDefault()));
|
||||
builder.timeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||
builder.simpleDateFormat(DatePattern.NORM_DATETIME_PATTERN);
|
||||
builder.modules(new PigxJavaTimeModule());
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user