fix(emqx_mgmt): data export failed on generating the exported filename

This commit is contained in:
Shawn 2020-12-23 16:41:18 +08:00
parent 6b5878cdd0
commit 865c63d82e
1 changed files with 2 additions and 2 deletions

View File

@ -103,8 +103,8 @@ export(_Bindings, _Params) ->
case file:write_file(NFilename, Bin) of
ok ->
case file:read_file_info(NFilename) of
{ok, #file_info{size = Size, ctime = {{Y, M, D}, {H, MM, S}}}} ->
CreatedAt = io_lib:format("~p-~p-~p ~p:~p:~p", [Y, M, D, H, MM, S]),
{ok, #file_info{size = Size, ctime = {{Y0, M0, D0}, {H0, MM0, S0}}}} ->
CreatedAt = io_lib:format("~p-~p-~p ~p:~p:~p", [Y0, M0, D0, H0, MM0, S0]),
return({ok, [{filename, list_to_binary(Filename)},
{size, Size},
{created_at, list_to_binary(CreatedAt)},