Fixes non changable alerts row length (#6056)

This commit is contained in:
Matteo Biscosi 2022-01-31 12:48:19 +01:00
parent b93d2a8feb
commit e147540aa3
10 changed files with 58 additions and 55 deletions

View file

@ -187,9 +187,13 @@ end
-- parse a SQL DATETIME date and convert to epoch
function format_utils.parseDateTime(tstamp)
local year, month, day, hour, min, sec = tstamp:match('^(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)$')
local epoch = os.time({month=month, day=day, year=year, hour=hour, min=min, sec=sec})
return epoch
if tstamp and not isEmptyString(tstamp) then
local year, month, day, hour, min, sec = tstamp:match('^(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)$')
local epoch = os.time({month=month, day=day, year=year, hour=hour, min=min, sec=sec})
return epoch
end
return ""
end
-- format an epoch using ISO 8601 format