mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
51df4f1d91
commit
7e0ac417d7
@ -28,7 +28,13 @@ class Book(Book_):
|
|||||||
self.size = size # will be set later if None
|
self.size = size # will be set later if None
|
||||||
|
|
||||||
if ContentType == '6' and date is not None:
|
if ContentType == '6' and date is not None:
|
||||||
self.datetime = time.strptime(date, "%Y-%m-%dT%H:%M:%S.%f")
|
try:
|
||||||
|
self.datetime = time.strptime(date, "%Y-%m-%dT%H:%M:%S.%f")
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
self.datetime = time.gmtime(os.path.getctime(self.path))
|
||||||
|
except:
|
||||||
|
self.datetime = time.gmtime()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
self.datetime = time.gmtime(os.path.getctime(self.path))
|
self.datetime = time.gmtime(os.path.getctime(self.path))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user