mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes non changable alerts row length (#6056)
This commit is contained in:
parent
b93d2a8feb
commit
e147540aa3
10 changed files with 58 additions and 55 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue