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

[BUG] java.sql.Timestamp序列化问题 #2460

Closed
changeAtLater opened this issue Apr 19, 2024 · 2 comments
Closed

[BUG] java.sql.Timestamp序列化问题 #2460

changeAtLater opened this issue Apr 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@changeAtLater
Copy link

问题描述

Timestamp timestamp1 = Timestamp.from(Instant.ofEpochMilli(1713494836000L));
System.out.println(JSON.toJSONString(timestamp1));
Timestamp timestamp2 = Timestamp.from(Instant.ofEpochMilli(1713494836123L));
System.out.println(JSON.toJSONString(timestamp2));

结果:

1713494836000
"2024-04-19 10:47:16.123"

环境信息

请填写以下信息:

  • OS信息: [e.g.:win10]
  • JDK信息: [e.g.:jdk 1.8.0_231]
  • 版本信息:[e.g.:Fastjson2 2.0.49]

期待的正确结果

请统一数据样式!!!

@changeAtLater changeAtLater added the bug Something isn't working label Apr 19, 2024
@wenshao wenshao added this to the 2.0.50 milestone Apr 19, 2024
@wenshao wenshao self-assigned this Apr 19, 2024
@wenshao
Copy link
Member

wenshao commented Apr 19, 2024

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.50-SNAPSHOT/
问题已修复,请帮忙用2.0.50-SNAPSHOT版本验证

@wenshao
Copy link
Member

wenshao commented May 12, 2024

https://github.com/alibaba/fastjson2/releases/tag/2.0.50
2.0.50已发布,请用新版本

@wenshao wenshao closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants