Where there's one bug, there may be another. I identified 4 distinct errors in this code. Besides time.timezone having the opposite of the expected sign, it does not account for DST. Also, the "% 60" in the dmm calculation extracts the seconds, not the minutes. And if you fix that, the minutes will be wrong if there's ever a 45-minute timezone in the western hemisphere.
--- lib/utils.py.orig
2024-10-09 15:04:02.828125111 -0500
+++ lib/utils.py
2024-10-09 15:08:07.019573053 -0500
@@ -1261,10 +1261,10 @@
self.tzname = 'UTC'
else:
t = time.time()
- lt = tuple(time.localtime(t))
- dhh = int(time.timezone / (3600.0))
- dmm = (time.timezone % 3600) % 60
- self.tzname = ''
+ lt = time.localtime(t)
+ dhh = int(lt.tm_gmtoff / 3600)
+ dmm = int(abs(lt.tm_gmtoff) % 3600 / 60)
+ self.tzname = lt.tm_zone
self.t = t
self.lt = lt
self.YMDhms = tuple(lt)[:6]