fix: improve rfc3339 format error

This commit is contained in:
zhongwencool 2021-12-15 16:58:07 +08:00
parent e4a21fd90d
commit a43ac1b778
1 changed files with 2 additions and 2 deletions

View File

@ -1386,8 +1386,8 @@ to_comma_separated_atoms(Str) ->
rfc3339_to_system_time(DateTime) ->
try
{ok, calendar:rfc3339_to_system_time(DateTime, [{unit, second}])}
catch error: {badmatch, _} ->
{error, ["The rfc3339 specification not satisfied"]}
catch error: _ ->
{error, bad_rfc3339_timestamp}
end.
to_unicode_binary(Str) ->