Skip to content

Commit 28095cc

Browse files
binary parser: parse filetime: handle timestamps of 0 better
1 parent b88343f commit 28095cc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Evtx/BinaryParser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def dosdate(dosdate, dostime):
105105

106106
def parse_filetime(qword):
107107
# see http://integriography.wordpress.com/2010/01/16/using-phython-to-parse-and-present-windows-64-bit-timestamps/
108+
if qword == 0:
109+
return datetime.min
110+
108111
try:
109112
return datetime.utcfromtimestamp(float(qword) * 1e-7 - 11644473600)
110113
except (ValueError, OSError):

0 commit comments

Comments
 (0)