Skip to content

Commit 6cdb67c

Browse files
authored
Merge branch 'main' into CAT-1525
2 parents 7eef065 + 2d49243 commit 6cdb67c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1818
### Fixed
1919

2020
- Fixed datetime filtering for .0Z milliseconds to preserve precision in apply_filter_datetime, ensuring only items exactly within the specified range are returned. [#535](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/535)
21+
- Normalize datetime in POST /search requests to match GET /search behavior. [#543](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/543)
2122

2223
### Removed
2324

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,10 @@ async def post_search(
799799
search=search, collection_ids=search_request.collections
800800
)
801801

802+
datetime_parsed = format_datetime_range(date_str=search_request.datetime)
802803
try:
803804
search, datetime_search = self.database.apply_datetime_filter(
804-
search=search, datetime=search_request.datetime
805+
search=search, datetime=datetime_parsed
805806
)
806807
except (ValueError, TypeError) as e:
807808
# Handle invalid interval formats if return_date fails

0 commit comments

Comments
 (0)