mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #6528 from ViktorHaag/last_updated-time-always-utc-iss6527
Force last update datetime value to always be UTC
This commit is contained in:
commit
2f97b86bfd
@ -274,7 +274,7 @@ def format_date(format: str, date: datetime = None, language: str = None) -> str
|
|||||||
if source_date_epoch is not None:
|
if source_date_epoch is not None:
|
||||||
date = datetime.utcfromtimestamp(float(source_date_epoch))
|
date = datetime.utcfromtimestamp(float(source_date_epoch))
|
||||||
else:
|
else:
|
||||||
date = datetime.now()
|
date = datetime.utcnow()
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
tokens = date_format_re.split(format)
|
tokens = date_format_re.split(format)
|
||||||
|
Loading…
Reference in New Issue
Block a user