mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-15 06:29:01 +08:00
♻️ 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() {
|
public Jackson2ObjectMapperBuilderCustomizer customizer() {
|
||||||
return builder -> {
|
return builder -> {
|
||||||
builder.locale(Locale.CHINA);
|
builder.locale(Locale.CHINA);
|
||||||
builder.timeZone(TimeZone.getTimeZone(ZoneId.systemDefault()));
|
builder.timeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||||
builder.simpleDateFormat(DatePattern.NORM_DATETIME_PATTERN);
|
builder.simpleDateFormat(DatePattern.NORM_DATETIME_PATTERN);
|
||||||
builder.modules(new PigxJavaTimeModule());
|
builder.modules(new PigxJavaTimeModule());
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user