diff options
author | 2022-01-08 08:57:45 +0530 | |
---|---|---|
committer | 2022-01-08 08:57:45 +0530 | |
commit | fbd072115ae79f4c7ec4960444a359a120bb0b05 (patch) | |
tree | e0976bc268d6787d05d3e467bb958c1348735541 | |
parent | disallow editing infraction durations into the past (diff) |
remove redundant tzinfo check
-rw-r--r-- | bot/exts/moderation/infraction/management.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py index 66ce698ee..1db579b89 100644 --- a/bot/exts/moderation/infraction/management.py +++ b/bot/exts/moderation/infraction/management.py @@ -150,7 +150,7 @@ class ModManagement(commands.Cog): request_data['expires_at'] = None confirm_messages.append("marked as permanent") elif duration is not None: - now_datetime = datetime.now(duration.tzinfo) if duration.tzinfo else datetime.utcnow() + now_datetime = datetime.now(timezone.utc) if duration < now_datetime: await ctx.send(":x: Expiration is in the past.") return |