From acc328c62bede4e1191ee3cf754ece6f734a1f69 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Fri, 6 Sep 2024 11:27:21 -0400 Subject: atom: datetime.utcnow() is deprecated --- atom/atom.py | 4 ++-- 1 file 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): -- cgit v1.2.3