summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-01-19 19:33:36 -0800
committerMicah Lee <micah@micahflee.com>2019-01-19 19:33:36 -0800
commita0c3a276ec4870b083bec829fcafab222ba51e68 (patch)
tree98f4bbdb92ddf756919d289f21b1563070598637
parent862a0dc067f38d700ec2339633a0701ac6b271d1 (diff)
downloadonionshare-a0c3a276ec4870b083bec829fcafab222ba51e68.tar.gz
onionshare-a0c3a276ec4870b083bec829fcafab222ba51e68.zip
Fix bug in HistoryItem.get_finished_label_text
-rw-r--r--onionshare_gui/mode/history.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py
index 44ee293f..bb419ec7 100644
--- a/onionshare_gui/mode/history.py
+++ b/onionshare_gui/mode/history.py
@@ -40,12 +40,11 @@ class HistoryItem(QtWidgets.QWidget):
def cancel(self):
pass
- def get_finished_label_text(self, started_ts):
+ def get_finished_label_text(self, started):
"""
When an item finishes, returns a string displaying the start/end datetime range.
started is a datetime object.
"""
- started = datetime.fromtimestamp(started_ts)
ended = datetime.now()
if started.year == ended.year and started.month == ended.month and started.day == ended.day:
if started.hour == ended.hour and started.minute == ended.minute:
@@ -111,7 +110,7 @@ class ShareHistoryItem(HistoryItem):
self.common.format_seconds(time.time() - self.started))
# Change the label
- self.label.setText(self.get_finished_label_text(self.started))
+ self.label.setText(self.get_finished_label_text(self.started_dt))
else:
elapsed = time.time() - self.started