From 58f9adfb2fcbe74604044cb2ebc3af63ff6d5b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Sat, 25 May 2024 10:49:28 +0200 Subject: Fix utctimestamp deprecation --- urldelta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'urldelta.py') diff --git a/urldelta.py b/urldelta.py index 0b775b7..b9e2358 100755 --- a/urldelta.py +++ b/urldelta.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from datetime import datetime +import datetime import sqlite3 import time import requests @@ -76,7 +76,7 @@ def get_page_delta(url): title=f"Change on {url}", url=url, content=f"Headers: {update[0]}\n\nContent: {update[1]}", - date=datetime.utcfromtimestamp(update[2]), + date=datetime.datetime.fromtimestamp(update[2], tz=datetime.UTC), enclosures=[], guid=update[2], ) -- cgit v1.2.3