Fix date format. (#7423)

This commit is contained in:
Nicolo Maio 2023-04-26 12:36:18 +00:00
parent 9625eaa850
commit a89557d393
4 changed files with 22 additions and 16 deletions

View file

@ -91,21 +91,10 @@ end
function backup_config.list_backup(user)
local saved_backups_keys = ntop.getHashKeysCache(backup_hash_key) or {}
local epoch_list = {}
local date_format = ntop.getPref("ntopng.user."..user..".date_format")
local format = ""
if(date_format == "little_endian") then
format = "DD/MMM/YYYY"
elseif(date_format == "middle_endian") then
format = "MMM/DD/YYYY"
else
format = "YYYY/MMM/DD"
end
for epoch, _ in pairs(saved_backups_keys) do
epoch_list[#epoch_list + 1] = {
epoch = epoch,
format = format
epoch = epoch
}
end