mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #2440 from xhochy/bugfix/source_date_epoch
Fix wrong import for gmtime
This commit is contained in:
@@ -14,7 +14,7 @@ import os
|
||||
import re
|
||||
import warnings
|
||||
from os import path
|
||||
from time import time
|
||||
from time import time, gmtime
|
||||
from datetime import datetime
|
||||
from collections import namedtuple
|
||||
|
||||
@@ -188,7 +188,7 @@ def format_date(format, date=None, language=None, warn=None):
|
||||
# See https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
|
||||
source_date_epoch = os.getenv('SOURCE_DATE_EPOCH')
|
||||
if source_date_epoch is not None:
|
||||
date = time.gmtime(float(source_date_epoch))
|
||||
date = gmtime(float(source_date_epoch))
|
||||
else:
|
||||
date = datetime.now()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user