Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Add Codec for java.util.Date #239

Open
zxeoc opened this issue Jun 27, 2022 · 0 comments
Open

Add Codec for java.util.Date #239

zxeoc opened this issue Jun 27, 2022 · 0 comments

Comments

@zxeoc
Copy link

zxeoc commented Jun 27, 2022

Hi, I've read #151, and I agree to avoid java.sql.Date and java.sql.Timestamp. And I agree JSR-310 types have significant advantages against java.util.Date. But I still think it's necessary to support java.util.Date.
For example, when a LocalDateTime serialize to JSON, by default it turns to things like "[2022,6,27,18,50,17,312372640]". First, it's more complex to deserialize. Second, there's no timezone info in it. Yes, I know there are OffsetDateTime and ZonedDateTime. But both of them serialize to things like "1656328666.118132193". All of these are quite different from the serialization result of java.util.Date. That means they'll break old codes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant