Skip to content

Commit

Permalink
Use start for date in GFInfo if time_res is not raw.
Browse files Browse the repository at this point in the history
  • Loading branch information
phaesler committed Apr 29, 2020
1 parent 7ba4456 commit 4a7e9a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions datacube_ows/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,10 @@ def feature_info(args):
pixel_ds = td.isel(**isel_kwargs)

# Get accurate timestamp from dataset
date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S UTC")

if params.product.is_raw_time_res:
date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S UTC")
else:
date_info["time"] = ds.time.begin.strftime("%Y-%m-%d")
# Collect raw band values for pixel and derived bands from styles
date_info["bands"] = _make_band_dict(params.product, pixel_ds, stacker.needed_bands())
derived_band_dict = _make_derived_band_dict(pixel_ds, params.product.style_index)
Expand Down

0 comments on commit 4a7e9a8

Please sign in to comment.