Skip to content

Commit

Permalink
account for optional Z in time strs
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Mar 20, 2024
1 parent 17d20c1 commit e1dd99e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mne_bids/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Check warning on line 335 in mne_bids/read.py

View check run for this annotation

Codecov / codecov/patch

mne_bids/read.py#L335

Added line #L335 was not covered by tests
acq_time = datetime.strptime(acq_time, "%Y-%m-%dT%H:%M:%S.%fZ")
acq_time = acq_time.replace(tzinfo=timezone.utc)

Expand Down

0 comments on commit e1dd99e

Please sign in to comment.