mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fixup date on windows in sony driver
This commit is contained in:
parent
e25b0e7f41
commit
d2677fc1bb
@ -12,7 +12,7 @@ from uuid import uuid4
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from calibre import prints, guess_type
|
||||
from calibre import prints, guess_type, iswindows
|
||||
from calibre.devices.errors import DeviceError
|
||||
from calibre.devices.usbms.driver import debug_print
|
||||
from calibre.constants import DEBUG
|
||||
@ -423,7 +423,10 @@ class XMLCache(object):
|
||||
return ans
|
||||
|
||||
def update_text_record(self, record, book, path, bl_index):
|
||||
timestamp = os.path.getctime(path)
|
||||
timestamp = os.path.getmtime(path)
|
||||
# Correct for MS DST time 'adjustment'
|
||||
if iswindows and time.daylight:
|
||||
timestamp -= time.altzone - time.timezone
|
||||
date = strftime(timestamp)
|
||||
if date != record.get('date', None):
|
||||
record.set('date', date)
|
||||
|
Loading…
x
Reference in New Issue
Block a user