1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-31 10:39:02 +00:00

os.date format string cleanup

Removed some non-ANSI-C strftime format strings ("%F") and
locale-dependent formats ("%c") from NSE scripts and libraries.
C99-specified %F was noticed by Alex Weber
(http://seclists.org/nmap-dev/2013/q2/300)
This commit is contained in:
dmiller
2013-05-16 14:59:48 +00:00
parent db621362cb
commit ba4097af38
8 changed files with 11 additions and 16 deletions

View File

@@ -1,7 +1,6 @@
local bin = require "bin"
local comm = require "comm"
local nmap = require "nmap"
local os = require "os"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
@@ -90,7 +89,7 @@ action = function(host, port)
-- the NTP4 reference above.
tstamp = sec - 2208988800 + frac / 0x10000000
table.insert(output, string.format("receive time stamp: %s", os.date("%c", tstamp)))
table.insert(output, string.format("receive time stamp: %s", stdnse.format_timestamp(tstamp)))
end
status, bufrlres = comm.exchange(host, port, rlreq, {proto=port.protocol, timeout=TIMEOUT})