From ecd9b4d94ec3c3e41fcbd0ccddc7f49a62da6af4 Mon Sep 17 00:00:00 2001 From: Peter Hinch Date: Wed, 20 Dec 2023 10:20:43 +0000 Subject: [PATCH] astronomy: Fix bug in sun_moon.set_lto. --- astronomy/sun_moon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astronomy/sun_moon.py b/astronomy/sun_moon.py index 898a00d..f4e5491 100644 --- a/astronomy/sun_moon.py +++ b/astronomy/sun_moon.py @@ -260,7 +260,7 @@ class RiSet: def set_lto(self, t): # Update the offset from UTC self.check_lto(t) # No need to recalc beause date is unchanged - lto = round(t * 3600) # Localtime offset in secs + self.lto = round(t * 3600) # Localtime offset in secs def has_risen(self, sun: bool): now = round(time.time()) + self.lto # UTC