Process the DATE command. Returns: - resp: server response if successful - date: datetime object
(self)
| 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) |
no test coverage detected