summaryrefslogtreecommitdiff
path: root/atom
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2024-09-06 11:27:21 -0400
committerFrederick Yin <fkfd@fkfd.me>2024-09-06 11:27:21 -0400
commitacc328c62bede4e1191ee3cf754ece6f734a1f69 (patch)
tree212f23ea4d061fa87ce3345d7b5c82d595d9b80e /atom
parent2e4451bec11dbbe95bb9d865a6c6d1071eaf3d2a (diff)
atom: datetime.utcnow() is deprecated
Diffstat (limited to 'atom')
-rwxr-xr-xatom/atom.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/atom/atom.py b/atom/atom.py
index b240378..65f77cb 100755
--- a/atom/atom.py
+++ b/atom/atom.py
@@ -3,7 +3,7 @@ import sys
import json
from urllib import parse as urlparse
from bs4 import BeautifulSoup
-from datetime import datetime
+from datetime import datetime, UTC
"""
Unified Atom feed generator for fkfd.me and fkfd.me/comics.
@@ -20,7 +20,7 @@ BLOG_DIR = "/home/fkfd/p/blog"
def utc_date() -> str:
# UTC datetime: YYYY-MM-DDThh:mm:ssZ
- return datetime.utcnow().replace(microsecond=0).isoformat() + "Z"
+ return datetime.now(UTC).replace(microsecond=0).isoformat() + "Z"
def add_entry(entry: dict, dryrun=False):