mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes browser local time format instead of server (#6688)
This commit is contained in:
parent
da14db9082
commit
6d0d522036
1 changed files with 3 additions and 3 deletions
|
|
@ -248,11 +248,11 @@ end
|
|||
function format_utils.formatPastEpochShort(input_epoch)
|
||||
local epoch_now = os.time()
|
||||
local epoch = input_epoch or epoch_now
|
||||
local day = os.date("!%d", epoch + getFrontendTzSeconds())
|
||||
local day_now = os.date("!%d", epoch_now + getFrontendTzSeconds())
|
||||
local day = os.date("!%d", epoch)
|
||||
local day_now = os.date("!%d", epoch_now)
|
||||
|
||||
if day == day_now then
|
||||
return os.date("!%X", epoch + getFrontendTzSeconds())
|
||||
return os.date("%X", epoch)
|
||||
end
|
||||
|
||||
return format_utils.formatEpoch(epoch)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue