Skip to content

Commit 3b4a486

Browse files
authored
Merge pull request #3069 from vkarak/enhancement/replace-Zfmt
[enhancement] Remove use of deprecated `%Z` directive in `strftime()`
2 parents 0ce98ee + bdbd758 commit 3b4a486

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

reframe/frontend/printer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
import datetime
7-
6+
import time
87
import reframe.core.logging as logging
98
import reframe.utility.color as color
109

@@ -68,7 +67,7 @@ def status(self, status, message='', just=None, level=logging.INFO):
6867
logging.getlogger().log(level, final_msg)
6968

7069
def timestamp(self, msg='', separator=None):
71-
msg = '%s %s' % (msg, datetime.datetime.today().strftime('%c %Z'))
70+
msg = f'{msg} {time.strftime("%c%z")}'
7271
if separator:
7372
self.separator(separator, msg)
7473
else:

0 commit comments

Comments
 (0)