From dbd514c4e4b3acc7c9d85ca89efff7d9fc8d2969 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Tue, 12 Dec 2023 14:15:53 +1100 Subject: [PATCH] Oops, read the std library docs more closely next time. --- datacube_ows/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datacube_ows/utils.py b/datacube_ows/utils.py index eb7e39c4..192efb61 100644 --- a/datacube_ows/utils.py +++ b/datacube_ows/utils.py @@ -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,