Answers for "python convert current datetime to rfc 1123 format"

1

python convert current datetime to rfc 1123 format

from wsgiref.handlers import format_date_time
from datetime import datetime
from time import mktime

now = datetime.now()
stamp = mktime(now.timetuple())
print format_date_time(stamp) #--> Wed, 22 Oct 2008 10:52:40 GMT
Posted by: Guest on March-31-2021

Code answers related to "python convert current datetime to rfc 1123 format"

Python Answers by Framework

Browse Popular Code Answers by Language