Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]关于时间序列化几个问题 #3199

Open
jqncc opened this issue Dec 9, 2024 · 1 comment
Open

[QUESTION]关于时间序列化几个问题 #3199

jqncc opened this issue Dec 9, 2024 · 1 comment
Labels
question Further information is requested

Comments

@jqncc
Copy link

jqncc commented Dec 9, 2024

版本2.0.53

  1. 这个版本时间默认带了格式, 如何配置回时间戳形式? 如接口之间交换数据,因为不需要人可识别, 所以没有格式化需求
  2. 新版时间格式带了毫秒值, 如果自定义了全局dateFormat=yyyy-MM-dd HH:mm:ss 又导致localdate,localtime全按照这个格式了. 是否可以对 datetime, date, time 三种时间配置全局格式?
@jqncc jqncc added the question Further information is requested label Dec 9, 2024
@Jinyun-Liu
Copy link

static {
JSON.register(LocalDate.class, ((jsonWriter, object,
fieldName, fieldType, features) -> {
if (object == null) {
jsonWriter.writeNull();
return;
}

        jsonWriter.writeString(object.toString());
    }));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants