MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / date

Method date

tools/python-3.11.9-amd64/Lib/nntplib.py:867–882  ·  view source on GitHub ↗

Process the DATE command. Returns: - resp: server response if successful - date: datetime object

(self)

Source from the content-addressed store, hash-verified

865 return resp, _parse_overview(lines, fmt)
866
867 def date(self):
868 """Process the DATE command.
869 Returns:
870 - resp: server response if successful
871 - date: datetime object
872 """
873 resp = self._shortcmd("DATE")
874 if not resp.startswith('111'):
875 raise NNTPReplyError(resp)
876 elem = resp.split()
877 if len(elem) != 2:
878 raise NNTPDataError(resp)
879 date = elem[1]
880 if len(date) != 14:
881 raise NNTPDataError(resp)
882 return resp, _parse_datetime(date, None)
883
884 def _post(self, command, f):
885 resp = self._shortcmd(command)

Callers 12

_localized_monthClass · 0.45
_localized_dayClass · 0.45
weekdayFunction · 0.45
itermonthdatesMethod · 0.45
calendar.pyFile · 0.45
timegmFunction · 0.45
convert_dateFunction · 0.45
cvt_fnMethod · 0.45
cvt_fnMethod · 0.45
cvt_fnMethod · 0.45
connection.pyFile · 0.45
today_is_later_thanFunction · 0.45

Calls 6

_shortcmdMethod · 0.95
NNTPReplyErrorClass · 0.85
NNTPDataErrorClass · 0.85
_parse_datetimeFunction · 0.85
startswithMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected