mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Small consistency fix for timestamp tzoffset calculation.
This commit is contained in:
parent
8519d70489
commit
dd2de96498
@ -108,14 +108,15 @@ class I18nBuilder(Builder):
|
||||
catalog.add(m, node)
|
||||
|
||||
|
||||
# determine tzoffset once to remain unaffected by DST change during build
|
||||
timestamp = time()
|
||||
tzdelta = datetime.fromtimestamp(timestamp) - \
|
||||
datetime.utcfromtimestamp(timestamp)
|
||||
|
||||
class LocalTimeZone(tzinfo):
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
super(LocalTimeZone, self).__init__(*args, **kw)
|
||||
tzdelta = datetime.fromtimestamp(timestamp) - \
|
||||
datetime.utcfromtimestamp(timestamp)
|
||||
self.tzdelta = tzdelta
|
||||
|
||||
def utcoffset(self, dt):
|
||||
|
Loading…
Reference in New Issue
Block a user