From e1dd99e9da9088418f2904a144c183f826008726 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Wed, 20 Mar 2024 15:23:25 +0100 Subject: [PATCH] account for optional Z in time strs --- mne_bids/read.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mne_bids/read.py b/mne_bids/read.py index 365cdd220..0836989e5 100644 --- a/mne_bids/read.py +++ b/mne_bids/read.py @@ -331,6 +331,8 @@ def _handle_scans_reading(scans_fname, raw, bids_path): if "." not in acq_time: # acquisition time ends with '.%fZ' microseconds string acq_time += ".0Z" + if "Z" not in acq_time: + acq_time += "Z" acq_time = datetime.strptime(acq_time, "%Y-%m-%dT%H:%M:%S.%fZ") acq_time = acq_time.replace(tzinfo=timezone.utc)