werkzeug.http_date

werkzeug.http_date(timestamp=None)[source]

Formats the time to match the RFC1123 date format.

Accepts a floating point number expressed in seconds since the epoch in, a datetime object or a timetuple. All times in UTC. The parse_date() function can be used to parse such a date.

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

Parameters:timestamp – If provided that date is used, otherwise the current.