From f6382a3eea81c1dd97b2e12fc81d42f8c77a4ae4 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Tue, 21 Sep 2021 21:51:20 -0700 Subject: Time: fix format_with_duration's 2nd arg's default It wasn't passing the current time when `other_timestamp` was None. --- bot/utils/time.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/utils/time.py b/bot/utils/time.py index 005608beb..dfe65369e 100644 --- a/bot/utils/time.py +++ b/bot/utils/time.py @@ -299,6 +299,9 @@ def format_with_duration( if timestamp is None: return None + if other_timestamp is None: + other_timestamp = arrow.utcnow() + formatted_timestamp = discord_timestamp(timestamp) duration = humanize_delta(timestamp, other_timestamp, max_units=max_units) -- cgit v1.2.3