Compare commits

..

2 commits

Author SHA1 Message Date
Pablo Méndez Hernández
f55954cf38
Merge 1b760a8f29 into 96ec2097cc 2025-04-17 12:05:51 +09:00
Pablo Méndez Hernández
1b760a8f29 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-15 12:45:10 +02:00

View file

@ -177,6 +177,8 @@ 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: