mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
b2641d5941
@ -372,13 +372,13 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
|
|||||||
self.apply_pubdate.setChecked(True)
|
self.apply_pubdate.setChecked(True)
|
||||||
|
|
||||||
def clear_pubdate(self, *args):
|
def clear_pubdate(self, *args):
|
||||||
self.pubdate.setMinimumDateTime(UNDEFINED_QDATETIME)
|
self.pubdate.setDateTime(UNDEFINED_QDATETIME)
|
||||||
|
|
||||||
def do_apply_adddate(self, *args):
|
def do_apply_adddate(self, *args):
|
||||||
self.apply_adddate.setChecked(True)
|
self.apply_adddate.setChecked(True)
|
||||||
|
|
||||||
def clear_adddate(self, *args):
|
def clear_adddate(self, *args):
|
||||||
self.adddate.setMinimumDateTime(UNDEFINED_QDATETIME)
|
self.adddate.setDateTime(UNDEFINED_QDATETIME)
|
||||||
|
|
||||||
def button_clicked(self, which):
|
def button_clicked(self, which):
|
||||||
if which == self.button_box.button(QDialogButtonBox.Apply):
|
if which == self.button_box.button(QDialogButtonBox.Apply):
|
||||||
|
@ -291,6 +291,11 @@ def clean_date_for_sort(dt, format):
|
|||||||
if not isinstance(dt, datetime):
|
if not isinstance(dt, datetime):
|
||||||
dt = datetime.combine(dt, time())
|
dt = datetime.combine(dt, time())
|
||||||
|
|
||||||
|
if hasattr(dt, 'tzinfo'):
|
||||||
|
if dt.tzinfo is None:
|
||||||
|
dt = dt.replace(tzinfo=_local_tz)
|
||||||
|
dt = as_local_time(dt)
|
||||||
|
|
||||||
if format == 'iso':
|
if format == 'iso':
|
||||||
format = 'yyMdhms'
|
format = 'yyMdhms'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user