Skip to content

Conversation

@mzaglia
Copy link

@mzaglia mzaglia commented Apr 16, 2021

Parse to rfc3339 only if the dates are strings.

@mzaglia
Copy link
Author

mzaglia commented May 3, 2021

can anyone take a look into this?

@kylebarron
Copy link
Contributor

Not sure if this is superseded by #75. @geospatial-jeff might have a better idea

@geospatial-jeff
Copy link
Collaborator

geospatial-jeff commented May 20, 2021

Thanks @kylebarron you are correct, as of #75 the field is simply typed as datetime instead of a union. When passed a string, pydantic will validate the date string against ISO format and convert to a datetime object.

I think this PR can be closed.

@geospatial-jeff
Copy link
Collaborator

Apologies I'm trying to figure out GitHub mobile and it's not going so well haha.

I just realized that the ItemProperties.datetime member is still typed with a Union, once that is fixed I think we will have the behavior described in this PR.

@moradology
Copy link
Collaborator

Closing as superseded by #75

@moradology moradology closed this Nov 23, 2021
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.

4 participants