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

datetime types silently drop timezone information on pydantic model serialization #41

Open
bruno-f-cruz opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bruno-f-cruz
Copy link
Collaborator

Pydantic seems to silently drop tz information. (pydantic/pydantic#9571.
This is rather annoying as the serialization behavior from the csharp generated classes correctly honors the timezone information.

Moving forward we should also just consider enforcing tz information via the AwareDatetime pydantic type (https://docs.pydantic.dev/2.0/usage/types/datetime/)

@bruno-f-cruz bruno-f-cruz self-assigned this Jun 20, 2024
@bruno-f-cruz bruno-f-cruz added the bug Something isn't working label Jun 20, 2024
@bruno-f-cruz bruno-f-cruz changed the title datetime types are silently dropping timezone information on pydantic model serilization datetime types silently drop timezone information on pydantic model serialization Jun 20, 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
Projects
None yet
Development

No branches or pull requests

1 participant