diff --git a/src/calibre/devices/kobo/books.py b/src/calibre/devices/kobo/books.py index 8d58dde892..1d9ccb9a0e 100644 --- a/src/calibre/devices/kobo/books.py +++ b/src/calibre/devices/kobo/books.py @@ -28,7 +28,13 @@ class Book(Book_): self.size = size # will be set later if 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: try: self.datetime = time.gmtime(os.path.getctime(self.path))