タイムスタンプを使用して日付を生成し、doubleに変換します。
Function CurrentTZOffset()
With CreateObject("WScript.Shell")
CurrentTZOffset = - .RegRead( _
"HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
End With
End Function
Dim dblVbEpoch
dblVbEpoch = CDbl(DateAdd("s", 1336708766790 / 1000, #1970/1/1#))
WScript.Echo "VB Epoch :", dblVbEpoch
WScript.Echo "VB Date (GMT):", CDate(dblVbEpoch)
WScript.Echo "VB Date (LOCAL):", DateAdd("n", CurrentTZOffset(), CDate(dblVbEpoch))
WScript.Echo "JS Epoch From VB Epoch:", DateDiff("s", #1970/1/1#, CDate(dblVbEpoch)) * 1000