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) -> rfc3339_to_system_time(DateTime) ->
try try
{ok, calendar:rfc3339_to_system_time(DateTime, [{unit, second}])} {ok, calendar:rfc3339_to_system_time(DateTime, [{unit, second}])}
catch error: {badmatch, _} -> catch error: _ ->
{error, ["The rfc3339 specification not satisfied"]} {error, bad_rfc3339_timestamp}
end. end.
to_unicode_binary(Str) -> to_unicode_binary(Str) ->