From 2c540fdd22ee5c6791a0ed5688967388a593188d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 19 May 2024 18:17:51 -0400 Subject: [PATCH] refer to UTC timezone portably --- leapseconddata/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leapseconddata/__init__.py b/leapseconddata/__init__.py index e76eb9e..9379422 100755 --- a/leapseconddata/__init__.py +++ b/leapseconddata/__init__.py @@ -84,7 +84,7 @@ class LeapSecondData: def _check_validity(self, when: Optional[datetime.datetime]) -> Optional[str]: if when is None: - when = datetime.datetime.now(datetime.UTC) + when = datetime.datetime.now(datetime.timezone.utc) if not self.valid_until: return "Data validity unknown" if when > self.valid_until: