mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7002 (Support for dates before 1900)
This commit is contained in:
parent
2d8540a4cc
commit
67722fca23
@ -43,7 +43,11 @@ class Epubcheck(ePubFixer):
|
|||||||
default=default)
|
default=default)
|
||||||
except:
|
except:
|
||||||
raise InvalidEpub('Invalid date set in OPF', raw)
|
raise InvalidEpub('Invalid date set in OPF', raw)
|
||||||
|
try:
|
||||||
sval = ts.strftime('%Y-%m-%d')
|
sval = ts.strftime('%Y-%m-%d')
|
||||||
|
except:
|
||||||
|
from calibre import strftime
|
||||||
|
sval = strftime('%Y-%m-%d', ts.timetuple())
|
||||||
if sval != raw:
|
if sval != raw:
|
||||||
self.log.error(
|
self.log.error(
|
||||||
'OPF contains date', raw, 'that epubcheck does not like')
|
'OPF contains date', raw, 'that epubcheck does not like')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user