opendatacube / datacube-core

Open Data Cube analyses continental scale Earth Observation data through time
http://www.opendatacube.org
Apache License 2.0
493 stars 175 forks source link

Make solar_date() timezone aware. #1521

Closed SpacemanPaul closed 6 months ago

SpacemanPaul commented 6 months ago

Reason for this pull request

The datacube.api.query.solar_date() function takes a dataset object and calculates it's local solar date, based on center time and central longitude. However, it assumes that the dataset center_time is in UTC timezone. If the the center_time is in some other timezone, an incorrect date may be returned.

See also: https://github.com/opendatacube/datacube-ows/issues/979

Proposed changes


:books: Documentation preview :books:: https://datacube-core--1521.org.readthedocs.build/en/1521/

codecov[bot] commented 6 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9fb8c8c) 91.75% compared to head (e77ee0d) 91.79%. Report is 3 commits behind head on develop.

Files Patch % Lines
datacube/index/memory/_datasets.py 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1521 +/- ## =========================================== + Coverage 91.75% 91.79% +0.03% =========================================== Files 132 132 Lines 14552 14617 +65 =========================================== + Hits 13352 13417 +65 Misses 1200 1200 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.