mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 07:03:26 +02:00
Fix timestamp comparison in edit metadata single
This commit is contained in:
parent
e4133df91a
commit
62b9a893f9
1 changed files with 2 additions and 2 deletions
|
|
@ -434,9 +434,9 @@ def __init__(self, window, row, db, accepted_callback=None, cancel_all=False):
|
|||
self.pubdate.setDate(QDate(pubdate.year, pubdate.month,
|
||||
pubdate.day))
|
||||
timestamp = db.timestamp(self.id, index_is_id=True)
|
||||
self.orig_timestamp = timestamp.astimezone(utc_tz)
|
||||
self.date.setDate(QDate(timestamp.year, timestamp.month,
|
||||
timestamp.day))
|
||||
self.orig_date = qt_to_dt(self.date.date())
|
||||
|
||||
exts = self.db.formats(row)
|
||||
if exts:
|
||||
|
|
@ -802,7 +802,7 @@ def accept(self):
|
|||
self.db.set_pubdate(self.id, d, notify=False, commit=False)
|
||||
d = self.date.date()
|
||||
d = qt_to_dt(d)
|
||||
if d.date() != self.orig_timestamp.date():
|
||||
if d != self.orig_date:
|
||||
self.db.set_timestamp(self.id, d, notify=False, commit=False)
|
||||
self.db.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue