8000 Add support for chrono::DateTimeWithTimeZone by haitrr · Pull Request #1367 · juhaku/utoipa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for chrono::DateTimeWithTimeZone #1367

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haitrr
Copy link
@haitrr haitrr commented Apr 9, 2025

Add support for chrono::DateTimeWithTimeZone

@haitrr haitrr changed the title feat: Add support for chrono::DateTimeWithTimeZone Add support for chrono::DateTimeWithTimeZone Apr 9, 2025
@jtwaleson
Copy link

I believe there is no DateTimeWithTimeZone , instead it comes from Sea-ORM which has:

#[cfg(feature = "with-chrono")]
pub type DateTimeWithTimeZone = chrono::DateTime<chrono::FixedOffset>;

This patch works, but is not the proper solution. In https://github.com/Aleph-Alpha/ts-rs this does work, so I think the problem in Utoipa is due to the types not being converted down to their actual primitives, instead the type name is used for the comparison.

This also relates to #1307

I'm not good enough at Rust to come up with a fix for this, but we could maybe look at how ts-rs solved this.

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

Successfully merging this pull request may close these issues.

2 participants
0