Navigation Menu

Skip to content

Commit

Permalink
gen_smtp_client: let Date header comply better to RFC 5322 by using 2…
Browse files Browse the repository at this point in the history
…-digit time components.
  • Loading branch information
Arjan Scherpenisse committed Jul 19, 2011
1 parent 0cb4aca commit 00c66b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/smtp_util.erl
Expand Up @@ -83,7 +83,7 @@ rfc5322_timestamp() ->
NDay = calendar:day_of_the_week(Year, Month, Day),
DoW = lists:nth(NDay, ?DAYS),
MoY = lists:nth(Month, ?MONTHS),
io_lib:format("~s, ~b ~s ~b ~b:~b:~b ~s", [DoW, Day, MoY, Year, Hour, Minute, Second, zone()]).
io_lib:format("~s, ~b ~s ~b ~2..0w:~2..0w:~2..0w ~s", [DoW, Day, MoY, Year, Hour, Minute, Second, zone()]).

%% @doc Calculate the current timezone and format it like -0400. Borrowed from YAWS.
zone() ->
Expand Down

0 comments on commit 00c66b0

Please sign in to comment.