Less than 60 seconds is "now"

This commit is contained in:
Stefan Bethke 2025-06-07 17:08:51 +02:00
commit 58f5f5cd4b

View file

@ -41,7 +41,7 @@ class BubaAnimation:
from_day_start = now.replace(hour=4, minute=0, second=0, microsecond=0) from_day_start = now.replace(hour=4, minute=0, second=0, microsecond=0)
now_delta = dt - now now_delta = dt - now
day_delta = dt - from_day_start day_delta = dt - from_day_start
if now_delta < timedelta(seconds=0): if now_delta < timedelta(seconds=60):
return "now" return "now"
if now_delta < timedelta(minutes=30): if now_delta < timedelta(minutes=30):
return f"{int(now_delta.seconds / 60)}m" return f"{int(now_delta.seconds / 60)}m"