summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2024-05-25 10:49:28 +0200
committerAndré Glüpker <git@wgmd.de>2024-05-25 10:49:28 +0200
commit58f9adfb2fcbe74604044cb2ebc3af63ff6d5b84 (patch)
treed905ebf5033fc798d58541122a19e531c4a927ef
parentb6251d2655fba0bfb570e9ea549adff96a55bd76 (diff)
downloadrss-feeds-58f9adfb2fcbe74604044cb2ebc3af63ff6d5b84.tar.gz
rss-feeds-58f9adfb2fcbe74604044cb2ebc3af63ff6d5b84.tar.bz2
rss-feeds-58f9adfb2fcbe74604044cb2ebc3af63ff6d5b84.zip
Fix utctimestamp deprecation
-rwxr-xr-xurldelta.py4
1 files changed, 2 insertions, 2 deletions
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],
)