1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-15 19:09:01 +00:00

Use ISO8601 time for smb-os-discovery

This commit is contained in:
dmiller
2012-08-16 15:46:37 +00:00
parent 74a2168a15
commit 9fbd30f191
2 changed files with 3 additions and 1 deletions

View File

@@ -124,7 +124,7 @@ action = function(host)
os_string = string.format( "%s (%s)", get_windows_version( result['os'] ), result['lanmanager'] )
end
if (result['date'] and result['timezone_str']) then
time_string = string.format("%s %s", result['date'], result['timezone_str'])
time_string = string.format("%s%+03d%02d", os.date("%Y-%m-%dT%H:%M:%S", result.time), result.timezone, math.abs(math.fmod(result.timezone, 1)) * 60)
end