From d9bef7d65e649ed814725557839d26512aef63a3 Mon Sep 17 00:00:00 2001 From: Nick Driver Date: Wed, 15 Mar 2017 09:03:02 -0400 Subject: [PATCH] extended the Windows fix to lines 168 and 471 --- pymisp/mispevent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index c9e3be8..9f0cfc6 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -165,7 +165,7 @@ class MISPAttribute(object): if kwargs.get('uuid'): self.uuid = kwargs['uuid'] if kwargs.get('timestamp'): - self.timestamp = datetime.datetime.fromtimestamp(int(kwargs['timestamp'])) + self.timestamp = datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=int(kwargs['timestamp'])) if kwargs.get('sharing_group_id'): self.sharing_group_id = int(kwargs['sharing_group_id']) if kwargs.get('deleted'): @@ -468,7 +468,7 @@ class MISPEvent(object): if kwargs.get('attribute_count'): self.attribute_count = int(kwargs['attribute_count']) if kwargs.get('timestamp'): - self.timestamp = datetime.datetime.fromtimestamp(int(kwargs['timestamp'])) + self.timestamp = datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=int(kwargs['timestamp'])) if kwargs.get('proposal_email_lock'): self.proposal_email_lock = kwargs['proposal_email_lock'] if kwargs.get('locked'):