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
parent 1fc1b0d935
commit 689b0730f8

View file

@ -828,7 +828,7 @@ def publish_one(%{inbox: inbox, json: json, actor: actor, id: id} = params) 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, %{