fix: improve rfc3339 format error
This commit is contained in:
parent
e4a21fd90d
commit
a43ac1b778
|
@ -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) ->
|
||||||
|
|
Loading…
Reference in New Issue