aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/signature.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/signature.ex')
-rw-r--r--lib/pleroma/signature.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/signature.ex b/lib/pleroma/signature.ex
index 15bf3c317..f20aeb0d5 100644
--- a/lib/pleroma/signature.ex
+++ b/lib/pleroma/signature.ex
@@ -53,4 +53,10 @@ defmodule Pleroma.Signature do
HTTPSignatures.sign(private_key, user.ap_id <> "#main-key", headers)
end
end
+
+ def signed_date, do: signed_date(NaiveDateTime.utc_now())
+
+ def signed_date(%NaiveDateTime{} = date) do
+ Timex.format!(date, "{WDshort}, {0D} {Mshort} {YYYY} {h24}:{m}:{s} GMT")
+ end
end