From 0fdcc14b76aeecb09bbb053effd510b02b1492a1 Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 27 Sep 2024 15:33:35 +0200 Subject: [PATCH] Fix timezone native/non-native comparison and missing argument --- src/api/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/client.py b/src/api/client.py index b0112e1..ca6eac7 100644 --- a/src/api/client.py +++ b/src/api/client.py @@ -64,7 +64,7 @@ class Client: if isinstance(given_time, float) or isinstance(given_time, int): return float(given_time) now = datetime.now(timezone.utc) - then = datetime(now.year, now.month, now.day, *(map(int, given_time.split(':'))), 0, 0) + then = datetime(now.year, now.month, now.day, *(map(int, given_time.split(':'))), 0, 0, tzinfo=timezone.utc) return float((then - now).seconds) def wrap_reschedule(function, period: float, *args, **kwargs): """Function for rescheduling a function every period of times. It provides args and kwargs to the function""" @@ -91,7 +91,7 @@ class Client: return dict() def parse_links(self, summary: str): - link_parser = self.LinkParser() + link_parser = self.LinkParser(self.WIKI_JUST_DOMAIN) link_parser.feed(summary) return link_parser.new_string