Skip to content
Snippets Groups Projects
Commit cafea59b 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 b2e42420
No related branches found
No related tags found
1 merge request!133WIP: prepare fast mseed to connect with SOHView
...@@ -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