aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_clock.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_clock.erl')
-rw-r--r--src/cowboy_clock.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cowboy_clock.erl b/src/cowboy_clock.erl
index 333df94..66fc009 100644
--- a/src/cowboy_clock.erl
+++ b/src/cowboy_clock.erl
@@ -69,6 +69,10 @@ stop() ->
rfc1123() ->
ets:lookup_element(?TABLE, rfc1123, 2).
+%% @doc Return the current date and time formatted according to RFC-2109.
+%%
+%% This format is used in the <em>'Set-Cookie'</em> header sent with
+%% HTTP responses.
-spec rfc2109(datetime()) -> binary().
rfc2109(LocalTime) ->
{{YYYY,MM,DD},{Hour,Min,Sec}} =
@@ -91,7 +95,6 @@ rfc2109(LocalTime) ->
MinBin/binary, ":",
SecBin/binary, " GMT">>.
-
%% gen_server.
%% @private