-
Notifications
You must be signed in to change notification settings - Fork 105
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
Breaking Change on STAC Item datetime field #204
Comments
I believe using pydantic's datetime parser should fix this instead of a single hard-coded datetime pattern. We made the same change to datetime parsing in stac-pydantic for similar reasons (stac-utils/stac-pydantic#75). |
Thanks Jeff Sounds promising that you already have an idea for a sustainable fix. |
What do you think about |
I think |
I just added this to the STAC API impl guide also https://github.com/radiantearth/stac-api-spec/blob/master/implementation.md#datetime-parameter-handling |
Also, this related issue #161 |
I just came across |
I just ran my test datetime values against it ciso8601, and only failed when it should have passed closeio/ciso8601#110 |
I ran it against a few others:
for arrow, pendulum, and iso8601, non of them handle lowercase I'm most in favor of using ciso8601 and getting that one bug fixed with it. |
I'm guessing you meant "only one failed"?
Cool; I also made a PR there for building binary wheels on releases (closeio/ciso8601#109); if accepted it should enable installing in environments where a C compiler isn't installed. |
lol, yes -- only that one, and an uncommon one at that. |
So, that RFC 3339 datetime with the comma as a separator is actually invalid -- for some reason, the RFC 3339 spec has an ISO 8601 ABNF in it, and I didn't notice that that's what it was when I created these examples. |
Closed with #368 |
Merge of this PR that adds unconditional dependency on |
@alexamici ciso8601 dependency was removed in 2.4.1 |
Hi
Thanks a lot for this cool tool-kit.
I seem to have problem with STAC Item datetime field serialization.
DATETIME_RFC339
introduced instac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/serializers.py
is causing timestamp format conversion error. Applying a temporary fix of assigningDATETIME_RFC339 = "%Y-%m-%dT%H:%M:%S.%fZ"
solves the issue. The RFC339 standard is missing%f
portion of datetime. I'm not sure whether use of the standard in test files has an impact, but I changed all occurrence of RFC339 to my temporary fix to be on the safe side!The text was updated successfully, but these errors were encountered: