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
1 changed files with 1 additions and 1 deletions

View File

@ -828,7 +828,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, %{