Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #convert #current #datetime #rfc #format
ADD COMMENT
Topic
Name
4+7 =