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

chrono::naive::serde::ts_milliseconds_option not found #434

Closed
GopherJ opened this issue Jun 18, 2020 · 4 comments
Closed

chrono::naive::serde::ts_milliseconds_option not found #434

GopherJ opened this issue Jun 18, 2020 · 4 comments
Labels

Comments

@GopherJ
Copy link

GopherJ commented Jun 18, 2020

No description provided.

@quodlibetor
Copy link
Contributor

Could you expand on this? Do you have the serde feature enabled?

@GopherJ
Copy link
Author

GopherJ commented Jun 18, 2020

@quodlibetor HI, I do have serde feature enabled I would like to be able to serialize Option<NaiveDateTime>,

but I cannot find equivalent ts_milliseconds_option serializer for NaiveDateTime

@quodlibetor
Copy link
Contributor

Ah, yes I see. I agree that that should exist. I'd be happy to take a PR implementing it, or I will add it eventually, but there are some larger things I'm working on that means I won't be able to do it immediately.

As a workaround you should be able to deserialize to a DateTime<Utc> and just extract to a naive time with exactly the same performance and semantics.

@pitdicker pitdicker added the serde label Sep 6, 2023
@pitdicker
Copy link
Collaborator

pitdicker commented Feb 2, 2024

Fixed in #664 (released in 2022 as chrono 0.4.20).

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

No branches or pull requests

3 participants