mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
Adjust base time by local offset for Windows
This commit is contained in:
@@ -22,7 +22,6 @@ local asn1 = require "asn1"
|
||||
local datetime = require "datetime"
|
||||
local io = require "io"
|
||||
local nmap = require "nmap"
|
||||
local os = require "os"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local stringaux = require "stringaux"
|
||||
@@ -825,8 +824,8 @@ function convertADTimeStamp(timestamp)
|
||||
|
||||
local result = 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
|
||||
-- seconds since 1601/1/1 adjusted for local offset
|
||||
local base_time = -11644473600 + datetime.system_time_at_epoch
|
||||
|
||||
timestamp = tonumber(timestamp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user