Skip to content

Commit

Permalink
Fixed decoding of timestamp by using correct format string (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpilz authored Apr 25, 2023
1 parent fa4bcdb commit b847b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xwrf/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _decode_times(ds: xr.Dataset) -> xr.Dataset:
)
except ValueError:
_time = pd.to_datetime(
ds.Times.data.astype('str'), errors='raise', format='%Y-%m-%dT%H:%M:%S.%f'
ds.Times.data.astype('str'), errors='raise', format='%Y-%m-%dT%H:%M:%S'
)
ds = ds.assign_coords({'Time': _time})
ds.Time.attrs = {'long_name': 'Time', 'standard_name': 'time'}
Expand Down

0 comments on commit b847b0e

Please sign in to comment.