1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +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

@@ -80,7 +80,6 @@ local bit = require "bit"
local datafiles = require "datafiles"
local math = require "math"
local nmap = require "nmap"
local os = require "os"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
@@ -3208,9 +3207,7 @@ Util =
-- @param number of seconds since some given start time
-- (the "epoch")
-- @return string that represents time.
TimeToString = function(time)
return os.date("!%F %H:%M", time)
end,
TimeToString = stdnse.format_timestamp,
--- Converts the size in bytes to a human readable format
--