From 9a497193db7cca2d64cd99251f34b83bec2d9137 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 4 Mar 2024 16:28:41 +0000 Subject: Update ruff to target Python 3.11 --- pydis_core/utils/scheduling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_core/utils/scheduling.py') diff --git a/pydis_core/utils/scheduling.py b/pydis_core/utils/scheduling.py index 621fdd81..a3a5c8a0 100644 --- a/pydis_core/utils/scheduling.py +++ b/pydis_core/utils/scheduling.py @@ -5,7 +5,7 @@ import contextlib import inspect import typing from collections import abc -from datetime import datetime, timezone +from datetime import UTC, datetime from functools import partial from discord.errors import Forbidden @@ -103,7 +103,7 @@ class Scheduler: task_id: A unique ID to create the task with. coroutine: The function to be called. """ - now_datetime = datetime.now(time.tzinfo) if time.tzinfo else datetime.now(tz=timezone.utc) + now_datetime = datetime.now(time.tzinfo) if time.tzinfo else datetime.now(tz=UTC) delay = (time - now_datetime).total_seconds() if delay > 0: coroutine = self._await_later(delay, task_id, coroutine) -- cgit v1.2.3