[Baypiggies] HTTP date format

Fahrzin Hemmati fahhem at google.com
Wed Feb 17 15:51:53 EST 2016


https://docs.python.org/2/library/email.util.html#email.utils.formatdate
Set usegmt=True to get the right timezone string.

On Wed, Feb 17, 2016 at 11:44 AM, Ian Zimmerman <itz at buug.org> wrote:

> Is there a _simple_ way of formatting a date/time (in any of the
> representations native to the Python standard library) in the format
> specified by RFC 7231 [1]?
>
> I do not consider an implementation simple if it contains its own lists
> of day and month names, such as [2] does.
>
> At some point, I will have to parse the format as well.
>
> [1]
> https://tools.ietf.org/html/rfc7231#section-7.1.1.1
>
> [2]
>
> https://github.com/sam-washington/requests-aws4auth/blob/master/requests_aws4auth/aws4auth.py#L396
>
> --
> Please *no* private copies of mailing list or newsgroup messages.
> Rule 420: All persons more than eight miles high to leave the court.
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> https://mail.python.org/mailman/listinfo/baypiggies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20160217/5a1d2539/attachment.html>


More information about the Baypiggies mailing list