qml: stop showing seconds in tx history timestamps
What changed, and why it matters
This commit is a minor user-interface tweak for Electrum's QML (mobile-style) transaction history. It removes seconds from displayed timestamps, showing times only to the nearest minute, matching the older Qt desktop GUI. There is no security relevance.
No action required. This is a cosmetic UI change with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies electrum/gui/qml/qetransactionlistmodel.py. It converts two helper methods to static methods and changes strftime format strings from %H:%M:%S to %H:%M across all date sections. This is purely presentational; no transaction data, validation, cryptography, or network behavior is affected.
Changed components
electrum/gui/qml/qetransactionlistmodel.pyInspect captured patch +9 / −7
diff --git a/electrum/gui/qml/qetransactionlistmodel.py b/electrum/gui/qml/qetransactionlistmodel.py
index 3b94d25..20d5029 100644
--- a/electrum/gui/qml/qetransactionlistmodel.py
+++ b/electrum/gui/qml/qetransactionlistmodel.py
@@ -162,7 +162,8 @@ class QETransactionListModel(QAbstractListModel, QtEventListener):
return item
- def get_section_by_timestamp(self, timestamp):
+ @staticmethod
+ def get_section_by_timestamp(timestamp):
txts = datetime.fromtimestamp(timestamp)
today = datetime.today().replace(hour=0, minute=0, second=0, microsecond=0)
@@ -177,14 +178,15 @@ class QETransactionListModel(QAbstractListModel, QtEventListener):
else:
return 'older'
- def format_date_by_section(self, section, date):
+ @staticmethod
+ def format_date_by_section(section: str, date: datetime):
# TODO: l10n
dfmt = {
- 'today': '%H:%M:%S',
- 'yesterday': '%H:%M:%S',
- 'lastweek': '%a, %H:%M:%S',
- 'lastmonth': '%a %d, %H:%M:%S',
- 'older': '%Y-%m-%d %H:%M:%S'
+ 'today': '%H:%M',
+ 'yesterday': '%H:%M',
+ 'lastweek': '%a, %H:%M',
+ 'lastmonth': '%a %d, %H:%M',
+ 'older': '%Y-%m-%d %H:%M'
}
if section not in dfmt:
section = 'older'
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.