diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index 14b190406..d0b2fa1e2 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -274,7 +274,7 @@ def format_date(format: str, date: datetime = None, language: str = None) -> str if source_date_epoch is not None: date = datetime.utcfromtimestamp(float(source_date_epoch)) else: - date = datetime.now() + date = datetime.utcnow() result = [] tokens = date_format_re.split(format)