mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
7e0ac417d7
commit
8c04dc14bd
@ -6,6 +6,7 @@ __copyright__ = '2010, Timothy Legge <timlegge at gmail.com>'
|
||||
import os
|
||||
import time
|
||||
|
||||
from calibre.utils.date import parse_date
|
||||
from calibre.devices.usbms.books import Book as Book_
|
||||
|
||||
class Book(Book_):
|
||||
@ -30,6 +31,10 @@ class Book(Book_):
|
||||
if ContentType == '6' and date is not None:
|
||||
try:
|
||||
self.datetime = time.strptime(date, "%Y-%m-%dT%H:%M:%S.%f")
|
||||
except:
|
||||
try:
|
||||
self.datetime = parse_date(date,
|
||||
assume_utc=True).timetuple()
|
||||
except:
|
||||
try:
|
||||
self.datetime = time.gmtime(os.path.getctime(self.path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user