From f4892df57711f0b564d55ba63c0ebdbb115ca40d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 20 May 2025 14:46:33 +0200 Subject: [eventlog] Don't use "smart"/relative time in events --- inc/audit.inc.php | 1 + inc/util.inc.php | 5 +++-- modules-available/eventlog/inc/filterruleprocessor.inc.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 inc/audit.inc.php diff --git a/inc/audit.inc.php b/inc/audit.inc.php new file mode 100644 index 00000000..b3d9bbc7 --- /dev/null +++ b/inc/audit.inc.php @@ -0,0 +1 @@ + $ETODAY) // TODO: Do we need strings for future too? + if (!$useSmartAbbreviation || $ts > $ETODAY) // TODO: Do we need strings for future too? return date('d.m.Y H:i', $ts); if (!$TODAY) $TODAY = strtotime('today 0:00'); if ($ts >= $TODAY) diff --git a/modules-available/eventlog/inc/filterruleprocessor.inc.php b/modules-available/eventlog/inc/filterruleprocessor.inc.php index ae60fb40..33ede356 100644 --- a/modules-available/eventlog/inc/filterruleprocessor.inc.php +++ b/modules-available/eventlog/inc/filterruleprocessor.inc.php @@ -328,7 +328,7 @@ class FilterRuleProcessor case 'b': return Util::readableFileSize((int)$v, -1, $shift); case 'ts': - return Util::prettyTime((int)$v); + return Util::prettyTime((int)$v, false); case 'd': return Util::formatDuration((int)$v); case 'L': -- cgit v1.2.3-55-g7522