We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a0db86 commit dfa6af0Copy full SHA for dfa6af0
src/openlifu/db/session.py
@@ -7,6 +7,8 @@
7
import xarray
8
import json
9
10
+DATE_FORMAT = "%d-%b-%Y %H:%M:%S"
11
+
12
@dataclass
13
class Session:
14
"""
@@ -70,9 +72,9 @@ def from_dict(d):
70
72
:returns: Session object
71
73
74
if 'date' in d:
- d['date'] = datetime.fromisoformat(d['date'])
75
+ d['date'] = datetime.strptime(d['date'],DATE_FORMAT)
76
if 'date_modified' in d:
- d['date_modified'] = datetime.fromisoformat(d['date_modified'])
77
+ d['date_modified'] = datetime.strptime(d['date_modified'],DATE_FORMAT)
78
if isinstance(d['volume'], dict):
79
d['volume'] = xarray.DataArray.from_dict(d['volume'])
80
if isinstance(d['transducer'], dict):
0 commit comments