Skip to content

Commit

Permalink
convert timestamps to UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariana Barzinpour committed Dec 1, 2023
1 parent ed913df commit 0343b76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datacube/drivers/postgis/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def get_duplicates_with_time(
query = select(
func.array_agg(func.distinct(time_overlap.c.id)).label("ids"),
*fields,
text("(lower(time_intersect)::timestamp, upper(time_intersect)::timestamp) as time")
text("(lower(time_intersect) at time zone 'UTC', upper(time_intersect) at time zone 'UTC') as time")
).select_from(
time_overlap
).group_by(
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/postgres/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ def get_duplicates_with_time(
final_query = select(
func.array_agg(func.distinct(overlapping.c.id)).label("ids"),
*fields,
text("(lower(time_intersect)::timestamp, upper(time_intersect)::timestamp) as time")
text("(lower(time_intersect) at time zone 'UTC', upper(time_intersect) at time zone 'UTC') as time")
).select_from(
overlapping
).group_by(
Expand Down

0 comments on commit 0343b76

Please sign in to comment.