From cafea59b5ed8833b50044a2efd46514aedc4f36e Mon Sep 17 00:00:00 2001 From: kienle <kienle@passcal.nmt.edu> Date: Thu, 20 Jul 2023 15:22:00 -0600 Subject: [PATCH] Fix the parsing of time from header Fix the millisecond part of time in header being parsed as microsecond --- sohstationviewer/model/reftek/rt130_experiment/reftek.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sohstationviewer/model/reftek/rt130_experiment/reftek.py b/sohstationviewer/model/reftek/rt130_experiment/reftek.py index eecae9bcb..4b1c452f3 100644 --- a/sohstationviewer/model/reftek/rt130_experiment/reftek.py +++ b/sohstationviewer/model/reftek/rt130_experiment/reftek.py @@ -58,7 +58,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime: # M = minute # S = second # T = microsecond - day_of_year, hour, minute, second, microsecond = ( + day_of_year, hour, minute, second, millisecond = ( int(time_string[0:3]), int(time_string[3:5]), int(time_string[5:7]), @@ -75,7 +75,7 @@ def parse_rt130_time(year: int, time_bytes: bytes) -> UTCDateTime: year += 1900 converted_time = UTCDateTime(year=year, julday=day_of_year, hour=hour, minute=minute, second=second, - microsecond=microsecond) + microsecond=millisecond * 1000) return converted_time -- GitLab