Skip to content
Snippets Groups Projects
Commit f8a0fc30 authored by Nils-Arne Dreier's avatar Nils-Arne Dreier
Browse files

fix: datetime shift

parent 1c56757c
No related branches found
No related tags found
1 merge request!52Migrate to Zarr 3
......@@ -132,7 +132,7 @@ def main():
t0 = (
np.datetime64(start_datetime())
- np.datetime64(var_group["time"].attrs["units"][len("seconds since ") :])
) / np.timedelta64(1, "s")
) / np.timedelta64(1, "s") + dt
t0_idx = np.searchsorted(var_group["time"], t0)
assert var_group["time"][t0_idx] == t0, f"start_datetime {t0} not found in time axis at index {t0_idx} which has value {var_group['time'][t0_idx]}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment