From b847b0e423dcd7d6d1a91c43f1366cb7b872aeea Mon Sep 17 00:00:00 2001 From: Lukas Pilz Date: Tue, 25 Apr 2023 13:45:01 +0200 Subject: [PATCH] Fixed decoding of timestamp by using correct format string (#128) --- xwrf/postprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwrf/postprocess.py b/xwrf/postprocess.py index 8e8ffda7..6aafd4d0 100644 --- a/xwrf/postprocess.py +++ b/xwrf/postprocess.py @@ -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'}