Compare commits

..

2 commits

Author SHA1 Message Date
Pablo Méndez Hernández
8e5473c738
Merge 2f224e6a6a into 96ec2097cc 2025-04-17 13:57:39 +00:00
Pablo Méndez Hernández
2f224e6a6a Add option to provide a different date/time format
The new `datetime_format` key will offer the possibility of
providing a different date/time format than the default one
(`'%A %d %B %Y  %H:%M:%S %z'`).

- The `iso8601` value can be used as an `'%Y-%m-%dT%H:%M:%S.%f'`
  alias (format of the ISO 8601 date/time standard).

The code has changed from using the `time` API to the `datetime`
one in order to support sub-second precision (needed by the ISO
8601 format, for example).

Signed-off-by: Pablo Mendez Hernandez <pablomh@redhat.com>
2025-04-17 15:57:00 +02:00

View file

@ -177,8 +177,6 @@ class CallbackModule(CallbackBase):
if self.datetime_format is not None:
if self.datetime_format == 'iso8601':
self.datetime_format = '%Y-%m-%dT%H:%M:%S.%f'
else:
self.datetime_format = '%A %d %B %Y %H:%M:%S %z'
def _display_tasktime(self):
if not self.summary_only: