Skip to content

Commit

Permalink
Oops, read the std library docs more closely next time.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Dec 12, 2023
1 parent c4063ab commit dbd514c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions datacube_ows/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def group_by_solar(pnames: Optional[List[str]] = None) -> "datacube.api.query.Gr
else:
sort_key = base_sort_key
# Wrap solar_day so we consistently get a datetime.
solar_day_py = lambda x: datetime.utcfromtimestamp(solar_day(x).astype(int) * 1e-9)
# dt = datetime.utcfromtimestamp(d.astype(int) * 1e-9)
solar_day_py = lambda x: datetime.datetime.fromtimestamp(solar_day(x).astype(int) * 1e-9, tz=datetime.timezone.utc)
return GroupBy(
dimension='time',
group_by_func=solar_day_py,
Expand Down

0 comments on commit dbd514c

Please sign in to comment.