import datetime
import time
from email import utils
nowdt = datetime.datetime.now()
nowtuple = nowdt.timetuple()
nowtimestamp = time.mktime(nowtuple)
utils.formatdate(nowtimestamp)
Преобразование даты и времени Python в rfc 2822