summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cherrypy/_cplogging.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cherrypy/_cplogging.py b/cherrypy/_cplogging.py
index 0e57c6ac..bce1c87b 100644
--- a/cherrypy/_cplogging.py
+++ b/cherrypy/_cplogging.py
@@ -453,4 +453,5 @@ class WSGIErrorHandler(logging.Handler):
class LazyRfc3339UtcTime(object):
def __str__(self):
"""Return utcnow() in RFC3339 UTC Format."""
- return f"{datetime.datetime.utcnow().isoformat('T')}Z"
+ iso_formatted_now = datetime.datetime.utcnow().isoformat('T')
+ return f'{iso_formatted_now!s}Z'