feat(util): app-wide 24h/12h clock format
Add util::formatClockDateTime/formatClockTime driven by a process-wide flag (setClock12h, synced from the time_format setting each frame). Switch the primary user-facing timestamp displays to it — the transaction list, wallet-state tx + banned-peer times, the explorer block time, and the block-info dialog — so one preference drives every clock. Log files, export filenames/content, console line prefixes, the market chart axis, and the worker-thread "last updated" string intentionally stay fixed 24h. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,10 +64,7 @@ struct DisplayTx {
|
||||
|
||||
std::string DisplayTx::getTimeString() const {
|
||||
if (timestamp <= 0) return TR("pending");
|
||||
std::time_t t = static_cast<std::time_t>(timestamp);
|
||||
char buf[64];
|
||||
std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M", std::localtime(&t));
|
||||
return buf;
|
||||
return dragonx::util::formatClockDateTime(timestamp); // honors the app-wide 24h/12h clock
|
||||
}
|
||||
|
||||
// Relative time string (localized long form, e.g. "5 minutes ago")
|
||||
|
||||
Reference in New Issue
Block a user