mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes nil epoch_begin (#6302)
This commit is contained in:
parent
92fb853c31
commit
f89ae72426
1 changed files with 3 additions and 3 deletions
|
|
@ -247,11 +247,11 @@ end
|
|||
|
||||
-- shorten an epoch when there is a well defined interval
|
||||
function format_utils.formatEpochShort(epoch_begin, epoch_end, epoch)
|
||||
local begin_day = os.date("!%d", epoch_begin + getFrontendTzSeconds())
|
||||
local end_day = os.date("!%d", epoch_end + getFrontendTzSeconds())
|
||||
local begin_day = os.date("!%d", (epoch_begin or os.time()) + getFrontendTzSeconds())
|
||||
local end_day = os.date("!%d", (epoch_end or os.time()) + getFrontendTzSeconds())
|
||||
|
||||
if begin_day == end_day then
|
||||
return os.date("!%X", epoch + getFrontendTzSeconds())
|
||||
return os.date("!%X", (epoch or os.time()) + getFrontendTzSeconds())
|
||||
end
|
||||
|
||||
return format_utils.formatEpoch(epoch)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue