From f31acea03d43c3e3880d38f9af3d415d4e5fe1a1 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 23 Mar 2022 16:13:27 +0100 Subject: [PATCH] L2SS-703: Avoid parsing timestamp 0, as Windows does not suport this --- .../tangostationcontrol/devices/sdp/statistics_collector.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py index 784750cd0..3a067aa9f 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py @@ -235,9 +235,8 @@ class XSTCollector(StatisticsCollector): # log if we're replacing a subband we were once recording previous_subband_in_slot = self.parameters["xst_subbands"][subband_slot] if previous_subband_in_slot != fields.subband_index: - previous_subband_timestamp = datetime.datetime.fromtimestamp(self.parameters["xst_timestamps"][subband_slot]) - - if previous_subband_timestamp.timestamp() > 0: + if self.parameters["xst_timestamps"][subband_slot] > 0: + previous_subband_timestamp = datetime.datetime.fromtimestamp(self.parameters["xst_timestamps"][subband_slot]) logger.info(f"Stopped recording XSTs for subband {previous_subband_in_slot}. Last data for this subband was received at {previous_subband_timestamp}.") def xst_values(self, subband_indices = None): -- GitLab