Hi guys.
Just want to use 'datetime' or 'time' modules. I based the following code on this question:
import time
def rfc1123 (gmt):
weekday = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][gmt.tm_wday]
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][gmt.tm_mon]
return "%s, %02d %s %04d %02d:%02d:%02d GMT" % (weekday, gmt.tm_mday, month, gmt.tm_year, gmt.tm_hour, gmt.tm_min, gmt.tm_sec)
print (rfc1123 (time.gmtime ()))
Is something wrong ? I'm really worried about the DST.
Thanks.