Implement DATE
This commit is contained in:
parent
a2cb8ebfaf
commit
84bc5ffd8e
1 changed files with 7 additions and 0 deletions
|
@ -548,6 +548,12 @@ class Session():
|
|||
|
||||
return self.respond(ResponseCode.NNTP_ARTICLE_STAT_RESPONSE, text)
|
||||
|
||||
def _cmd_date(self):
|
||||
timestamp = datetime.datetime.now(datetime.UTC)
|
||||
|
||||
return self.respond(ResponseCode.NNTP_DATE,
|
||||
timestamp.strftime("%Y%m%d%H%M%S"))
|
||||
|
||||
COMMANDS = {
|
||||
'CAPABILITIES': _cmd_capabilities,
|
||||
'GROUP': _cmd_group,
|
||||
|
@ -560,6 +566,7 @@ class Session():
|
|||
'ARTICLE': _cmd_article,
|
||||
'HDR': _cmd_hdr,
|
||||
'STAT': _cmd_stat,
|
||||
'DATE': _cmd_date,
|
||||
}
|
||||
|
||||
def handle(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue