rfc822 date header

Jeff Bauer jbauer at rubic.com
Tue Apr 13 11:30:24 EDT 1999


Jeremy Hylton wrote:
> If you write it, I'll lobby :-).

As a first pass, we could do lots worse than Chris Lawrence's 
GMT version (untested).

def strdate(self, timeval=None):
    from time import gmtime, strftime, time
    if timeval is None:
        timeval = time()
    return "Date: %s" % strftime('%a, %d %b %Y %H:%M:%S GMT',
gmtime(timeval))

-Jeff




More information about the Python-list mailing list