1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 02:19:04 +00:00

Handle date formatting for Windows for years earlier than 1970. See #2136

This commit is contained in:
dmiller
2020-10-08 23:09:21 +00:00
parent e3262d33d6
commit 50bef20b92
3 changed files with 32 additions and 39 deletions

View File

@@ -824,7 +824,9 @@ end
function convertADTimeStamp(timestamp)
local result = 0
local base_time = tonumber(os.time({year=1601, month=1, day=1, hour=0, minute=0, sec =0}))
-- Windows cannot represent this time, so we pre-calculated it:
-- os.time({year=1601, month=1, day=1, hour=0, minute=0, sec =0})
local base_time = -11644473600
timestamp = tonumber(timestamp)