utils.http.http_date()

http_date(epoch_seconds=None) [source]

Formats the time to match the RFC 1123 date format as specified by HTTP RFC 7231#section-7.1.1.1.

Accepts a floating point number expressed in seconds since the epoch in UTC–such as that outputted by time.time(). If set to None, defaults to the current time.

Outputs a string in the format Wdy, DD Mon YYYY HH:MM:SS GMT.

doc_Django
2016-10-09 18:40:31
Comments
Leave a Comment

Please login to continue.