mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Move date/time functions from stdnse to datetime. See #517
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
|
||||
local bin = require "bin"
|
||||
local bit = require "bit"
|
||||
local datetime = require "datetime"
|
||||
local ipOps = require "ipOps"
|
||||
local nmap = require "nmap"
|
||||
local os = require "os"
|
||||
@@ -1778,9 +1779,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 = stdnse.format_timestamp(item.CreationDate + diff)
|
||||
local backup = stdnse.format_timestamp(item.BackupDate )
|
||||
local modify = stdnse.format_timestamp(item.ModificationDate + diff )
|
||||
local create = datetime.format_timestamp(item.CreationDate + diff)
|
||||
local backup = datetime.format_timestamp(item.BackupDate )
|
||||
local modify = datetime.format_timestamp(item.ModificationDate + diff )
|
||||
|
||||
return true, { create = create, backup = backup, modify = modify }
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user