activitypub: fix date header format

HTTP date header specification says that days must always be two-digit.
Accordingly, change the format string used to ensure days are always
represented as two-digit (e.g. 01).
This commit is contained in:
William Pitcock 2019-03-01 12:21:09 +00:00 committed by rinpatch
parent e58596bbdc
commit 28578c6ab5

View file

@ -776,7 +776,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
date =
NaiveDateTime.utc_now()
|> Timex.format!("{WDshort}, {D} {Mshort} {YYYY} {h24}:{m}:{s} GMT")
|> Timex.format!("{WDshort}, {0D} {Mshort} {YYYY} {h24}:{m}:{s} GMT")
signature =
Pleroma.Web.HTTPSignatures.sign(actor, %{