1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 05:39:01 +00:00

Use stdnse.format_timestamp in more places to avoid formatting issues. See #1255, #1303

This commit is contained in:
dmiller
2018-08-16 21:26:48 +00:00
parent 834e37d475
commit 6c4e02e89d
8 changed files with 13 additions and 13 deletions

View File

@@ -1778,9 +1778,9 @@ Helper = {
local item = ( response.result.file ) and response.result.file or response.result.dir
local diff = os.time{year=2000, month=1, day=1, hour=0} - os.time{year=1970, month=1, day=1, hour=0}
local create = os.date("%Y-%m-%d %H:%M", item.CreationDate + diff)
local backup = os.date("%Y-%m-%d %H:%M", item.BackupDate )
local modify = os.date("%Y-%m-%d %H:%M", item.ModificationDate + diff )
local create = stdnse.format_timestamp(item.CreationDate + diff)
local backup = stdnse.format_timestamp(item.BackupDate )
local modify = stdnse.format_timestamp(item.ModificationDate + diff )
return true, { create = create, backup = backup, modify = modify }
end,