From 949ee12ed2e82afbd6e94f1ae1f2743cdd968e06 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Wed, 18 Feb 2026 01:30:46 +0500 Subject: [PATCH] use utc timezone when getting the server time --- mtprotoproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index dfd54aa..2565b72 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -2011,6 +2011,7 @@ async def get_srv_time(): continue line = line[len("Date: "):].decode() srv_time = datetime.datetime.strptime(line, "%a, %d %b %Y %H:%M:%S %Z") + srv_time = srv_time.replace(tzinfo=datetime.timezone.utc) now_time = datetime.datetime.now(datetime.timezone.utc) is_time_skewed = (now_time-srv_time).total_seconds() > MAX_TIME_SKEW if is_time_skewed and config.USE_MIDDLE_PROXY and not disable_middle_proxy: