-
Notifications
You must be signed in to change notification settings - Fork 34
fix: ensure min, max dates have correct format #539
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
Conversation
jonhealy1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should line 78 look like this for consistency?
datetime_iso = dt_utc.isoformat().replace("+00:00", "Z")
| # Ensure datetimes are converted to UTC and formatted with 'Z' | ||
| if start: | ||
| result["gte"] = start.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z" | ||
| result["gte"] = start_utc.isoformat().replace("+00:00", "Z") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be start.isoformat() not start_utc.isoformat() I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thank you!
| result["gte"] = start_utc.isoformat().replace("+00:00", "Z") | ||
| if end: | ||
| result["lte"] = end.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z" | ||
| result["lte"] = end_utc.isoformat().replace("+00:00", "Z") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - end_utc has not been defined in this block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thank you!
516f92a to
79e1e56
Compare
Yes, thank you, fixed this too. |
5dba133 to
58d4ff5
Compare
jonhealy1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
Description:
Currently, the
minandmaxdates used inapply_datetime_filterforPOSTrequests are not formatted correctly. This PR fixes the issue:PR Checklist:
pre-commit run --all-files)make test)