We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some APIs returns timezone without a colon symbol. Like this:
DT_STRING = "2023-08-25T20:32:38.696+0000"
It's not a problem for python's datetime:
datetime
datetime.fromisoformat(DT_STRING) # 2023-08-25 20:32:38.696000+00:00
But it's a problem for msgspec:
msgspec
class Issue(Struct): created_at: datetime convert({"created_at": DT_STRING}, MyModel) # msgspec.ValidationError: Invalid RFC3339 encoded datetime - at `$.created_at`
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
Some APIs returns timezone without a colon symbol. Like this:
It's not a problem for python's
datetime
:But it's a problem for
msgspec
:The text was updated successfully, but these errors were encountered: