From ba406f12a503cc1b554289047e697abc0a8a8576 Mon Sep 17 00:00:00 2001 From: Cooper Ry Lees Date: Wed, 1 Jan 2025 21:46:26 -0600 Subject: [PATCH] Remove usage of deprecated datetime.datetime.utcnow() --- src/bandersnatch/mirror.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bandersnatch/mirror.py b/src/bandersnatch/mirror.py index 2cda42262..519167268 100644 --- a/src/bandersnatch/mirror.py +++ b/src/bandersnatch/mirror.py @@ -55,7 +55,7 @@ async def synchronize( sync_simple_index: bool = True, ) -> dict[str, set[str]]: logger.info(f"Syncing with {self.master.url}.") - self.now = datetime.datetime.utcnow() + self.now = datetime.datetime.now(datetime.UTC) # Lets ensure we get a new dict each run # - others importing may not reset this like our main.py self.altered_packages = {}