From 88823bec6407b51a873f95c905c2613519ba7438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 11 Nov 2024 20:48:14 +0000 Subject: [PATCH] Fix comparison in get_night_metrics --- src/lvmapi/tools/logs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lvmapi/tools/logs.py b/src/lvmapi/tools/logs.py index 469d992..ba62ad8 100644 --- a/src/lvmapi/tools/logs.py +++ b/src/lvmapi/tools/logs.py @@ -877,6 +877,6 @@ def get_night_metrics(sjd: int | None = None) -> NightMetricsDict: "time_lost": round(night_length - total_exp_time, 2), "efficiency_no_readout": round(eff_no_readout * 100, 2), "efficiency_readout": round(eff_readout * 100, 2), - "night_started": now >= twilight_end.unix, - "night_ended": now >= twilight_start.unix, + "night_started": now.unix >= twilight_end.unix, + "night_ended": now.unix >= twilight_start.unix, }