NASA-IMPACT / veda-backend

Backend services for VEDA
Other
13 stars 5 forks source link

Use consistent datetime formatting in collection temporal extent #401

Open anayeaye opened 4 months ago

anayeaye commented 4 months ago

What

A new method was added to to veda-backend's pgstac schema to describe the maximum temporal range of items that have an end_datetime greater than the nominal datetime but the extents are recorded in a different format that what is used for datetime summaries. Update the max temporal extent method to align with the summaries formatting.

Where/how

temporal_extent_max sql

Should follow convention used in datetime summaries

min(datetime)::text --> to_char(min(datetime) at time zone 'Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"') max(end_datetime)::text --> to_char(max(end_datetime) at time zone 'Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"'

AC