Skip to content
Snippets Groups Projects
Commit 602ebd2e authored by Kien Le's avatar Kien Le
Browse files

Fix the parsing of time from header

Fix the millisecond part of time in header being parsed as microsecond
parent 87693a4b
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime: ...@@ -58,7 +58,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime:
# M = minute # M = minute
# S = second # S = second
# T = microsecond # T = microsecond
day_of_year, hour, minute, second, microsecond = ( day_of_year, hour, minute, second, millisecond = (
int(time_string[0:3]), int(time_string[0:3]),
int(time_string[3:5]), int(time_string[3:5]),
int(time_string[5:7]), int(time_string[5:7]),
...@@ -75,7 +75,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime: ...@@ -75,7 +75,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime:
year += 1900 year += 1900
converted_time = UTCDateTime(year=year, julday=day_of_year, hour=hour, converted_time = UTCDateTime(year=year, julday=day_of_year, hour=hour,
minute=minute, second=second, minute=minute, second=second,
microsecond=microsecond) microsecond=millisecond * 1000)
return converted_time return converted_time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment