MCPcopy Index your code
hub / github.com/RustPython/RustPython / date_time_string

Method date_time_string

Lib/http/server.py:665–669  ·  view source on GitHub ↗

Return the current date and time formatted for a message header.

(self, timestamp=None)

Source from the content-addressed store, hash-verified

663 return self.server_version + ' ' + self.sys_version
664
665 def date_time_string(self, timestamp=None):
666 """Return the current date and time formatted for a message header."""
667 if timestamp is None:
668 timestamp = time.time()
669 return email.utils.formatdate(timestamp, usegmt=True)
670
671 def log_date_time_string(self):
672 """Return the current time formatted for logging."""

Callers 3

send_responseMethod · 0.95
send_headMethod · 0.80
test_date_time_stringMethod · 0.80

Calls 1

timeMethod · 0.45

Tested by 1

test_date_time_stringMethod · 0.64