Skip to content

Commit 3158ef6

Browse files
committed
Fix datetime unit conversion
1 parent 9cf6b69 commit 3158ef6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo/rawio/plexon2rawio/plexon2rawio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ def _parse_header(self):
213213
tmo = anno_value
214214
# invalid datetime information if year is <1
215215
if tmo.tm_year != 0:
216+
microseconds = block_info['m_CreatorDateTimeMilliseconds'] * 1e3
216217
dt = datetime(year=tmo.tm_year, month=tmo.tm_mon, day=tmo.tm_mday, hour=tmo.tm_hour,
217-
minute=tmo.tm_min, second=tmo.tm_sec, microsecond=block_info['m_CreatorDateTimeMilliseconds'])
218+
minute=tmo.tm_min, second=tmo.tm_sec, microsecond=microseconds)
218219
# ignoring daylight saving time information for now as timezone is unknown
219220

220221
else:

0 commit comments

Comments
 (0)