Fix #7002 (Support for dates before 1900)

This commit is contained in:
Kovid Goyal 2010-09-30 10:56:19 -06:00
parent 2d8540a4cc
commit 67722fca23

View File

@ -43,7 +43,11 @@ class Epubcheck(ePubFixer):
default=default)
except:
raise InvalidEpub('Invalid date set in OPF', raw)
try:
sval = ts.strftime('%Y-%m-%d')
except:
from calibre import strftime
sval = strftime('%Y-%m-%d', ts.timetuple())
if sval != raw:
self.log.error(
'OPF contains date', raw, 'that epubcheck does not like')