Skip to content

include microseconds when decoding datetime objects #76

Closed
@geospatial-jeff

Description

@geospatial-jeff

Thanks for reviewing and merging!

Good point on the serialization discrepancy. The major meaningful difference to me is that the sub-second portion of the datetime is discarded during serialization. But this probably doesn't matter most of the time.

Could be fixed by changing

https://github.com/stac-utils/stac-pydantic/blob/master/stac_pydantic/shared.py#L18

to include the %f (microsecond) part.

DATETIME_RFC339 = "%Y-%m-%dT%H:%M:%S.%fZ"

Originally posted by @colecloudtostreet in #75 (comment)

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