Skip to content
Snippets Groups Projects
Commit 2a7e717a authored by Bruce Flynn's avatar Bruce Flynn
Browse files

fix incorrect leapsec math for AQUA CUC

parent 624c428e
No related branches found
Tags 0.15.2
No related merge requests found
......@@ -110,7 +110,7 @@ class AquaCucTimecode(Timecode):
def day_segmented_timecode(self):
days = self.seconds / 86400
leap_ms = self.leap_seconds * 1e3
millis = 86400 * (days - int(days)) * 1e3 + leap_ms
millis = 86400 * (days - int(days)) * 1e3 - leap_ms
micros = self.SUB_SECOND_UNITS * self.sub_seconds
return int(days), int(millis), int(micros)
......
......@@ -11,7 +11,7 @@ class TestAquaCUCTimecode:
pytest.param(
# GBAD secondary header data
bytes([0xAE, 0x25, 0x77, 0x1E, 0xCA, 0x8E, 0x80, 0x20]),
datetime(2021, 4, 30, 20, 44, 35, 497560),
datetime(2021, 4, 30, 20, 43, 21, 497560),
id="gbad",
)
],
......
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