Skip to content

Commit 7724f2f

Browse files
authored
Merge branch 'main' into enable-catalog-route
2 parents d5087fd + 2d49243 commit 7724f2f

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
steps:
7777
- name: Check out repository code
78-
uses: actions/checkout@v5
78+
uses: actions/checkout@v6
7979

8080
- name: Setup Python
8181
uses: actions/setup-python@v6

.github/workflows/deploy_mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout main
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v6
2222

2323
- name: Set up Python 3.11
2424
uses: actions/setup-python@v6

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1515

1616
- name: Set up Python 3.11
1717
uses: actions/setup-python@v6
@@ -80,7 +80,7 @@ jobs:
8080

8181
steps:
8282
- name: Checkout repository
83-
uses: actions/checkout@v5
83+
uses: actions/checkout@v6
8484

8585
- name: Set up QEMU
8686
uses: docker/setup-qemu-action@v3

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313

1414
### Fixed
1515

16+
- 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)
17+
- Normalize datetime in POST /search requests to match GET /search behavior. [#543](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/543)
18+
1619
### Removed
1720

1821
## [v6.7.5] - 2025-11-25

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,10 @@ async def post_search(
790790
search=search, collection_ids=search_request.collections
791791
)
792792

793+
datetime_parsed = format_datetime_range(date_str=search_request.datetime)
793794
try:
794795
search, datetime_search = self.database.apply_datetime_filter(
795-
search=search, datetime=search_request.datetime
796+
search=search, datetime=datetime_parsed
796797
)
797798
except (ValueError, TypeError) as e:
798799
# Handle invalid interval formats if return_date fails

stac_fastapi/core/stac_fastapi/core/datetime_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def normalize(dt):
3232
dt_utc = MIN_DATE_NANOS
3333
if dt_utc > MAX_DATE_NANOS:
3434
dt_utc = MAX_DATE_NANOS
35-
return dt_utc.isoformat(timespec="auto").replace("+00:00", "Z")
35+
dt_normalized = dt_utc.isoformat(timespec="auto").replace("+00:00", "Z")
36+
if "." not in dt_normalized:
37+
dt_normalized = dt_normalized.replace("Z", ".0Z")
38+
return dt_normalized
3639

3740
if not isinstance(date_str, str):
3841
return f"{MIN_DATE_NANOS.isoformat(timespec='auto').replace('+00:00','Z')}/{MAX_DATE_NANOS.isoformat(timespec='auto').replace('+00:00','Z')}"

0 commit comments

Comments
 (0)