Skip to content

Date-only strings cause 400 errors from STAC APIs #40

@AliceR

Description

@AliceR

Problem

STAC APIs return 400 errors when sending date strings like 2025-12-01. They require full datetime format like 2025-12-01T00:00:00Z.

Error message:

invalid datetime separator, expected `T`, `t`, `_` or space

Solution

Convert date-only strings to full ISO 8601 datetime format in makeDatetimePayload():

  • 2025-12-012025-12-01T00:00:00Z (start of day)
  • 2025-12-312025-12-31T23:59:59Z (end of day)

Keep existing datetime strings unchanged (if they already contain T).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions