summaryrefslogtreecommitdiff
path: root/sphinx/util/i18n.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-07 18:50:58 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-07 18:50:58 +0900
commit1c152d249c2f1845497dbc40b0c18113ac19663e (patch)
tree9a08faf7a3158188a10f069868ac60c4b006ad45 /sphinx/util/i18n.py
parentc9078fa8c80672354a1b1a078e12e2921d7e73ed (diff)
parent96fa46e7b36a4f7571169a76b42fffb547702952 (diff)
downloadsphinx-git-1c152d249c2f1845497dbc40b0c18113ac19663e.tar.gz
Merge branch '2.0'
Diffstat (limited to 'sphinx/util/i18n.py')
-rw-r--r--sphinx/util/i18n.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py
index eeb961172..5466e5459 100644
--- a/sphinx/util/i18n.py
+++ b/sphinx/util/i18n.py
@@ -12,7 +12,7 @@ import os
import re
import warnings
from collections import namedtuple
-from datetime import datetime
+from datetime import datetime, timezone
from os import path
from typing import Callable, Generator, List, Set, Tuple
@@ -270,7 +270,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.utcnow()
+ date = datetime.now(timezone.utc).astimezone()
result = []
tokens = date_format_re.split(format)