You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #626 from pablomh/datetime_format
plugins/callback/profile_tasks.py: Add option to provide a different date/time format
SUMMARY
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).
Fixes: #279
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
plugins/callback/profile_tasks.py
ADDITIONAL INFORMATION
Output with no key which keeps current behavior:
TASK [Import subscription manifest] *******************************************************************************************************************************************************************************************************************************************************************
Thursday 10 April 2025 00:52:11 +0200 (0:00:17.416) 0:00:17.453 ********
changed: [localhost]
Output with datetime_format = 'iso8601':
TASK [Import subscription manifest] *******************************************************************************************************************************************************************************************************************************************************************
2025-04-10T00:55:19.967718 (0:00:15.664) 0:00:15.691 ********************
changed: [localhost]
Output with datetime_format = '%Y-%m-%dT%H:%M:%S.%f%z' (ISO 8601 with UTC offset information):
TASK [Import subscription manifest] *******************************************************************************************************************************************************************************************************************************************************************
2025-04-10T00:57:49.290347+0200 (0:00:16.265) 0:00:16.293 ***************
changed: [localhost]
Reviewed-by: Hideki Saito <[email protected]>
0 commit comments