MCPcopy Index your code
hub / github.com/python/cpython / log_date_time_string

Method log_date_time_string

Lib/http/server.py:643–649  ·  view source on GitHub ↗

Return the current time formatted for logging.

(self)

Source from the content-addressed store, hash-verified

641 return email.utils.formatdate(timestamp, usegmt=True)
642
643 def log_date_time_string(self):
644 """Return the current time formatted for logging."""
645 now = time.time()
646 year, month, day, hh, mm, ss, x, y, z = time.localtime(now)
647 s = "%02d/%3s/%04d %02d:%02d:%02d" % (
648 day, self.monthname[month], year, hh, mm, ss)
649 return s
650
651 weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
652

Callers 2

log_messageMethod · 0.95
log_messageMethod · 0.80

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected