Skip to content

Commit

Permalink
Fixing datetime parser
Browse files Browse the repository at this point in the history
  • Loading branch information
JCantu248 committed Jun 22, 2021
1 parent fcbd1db commit 2898f62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""This file defines the version of this project."""
__version__ = "0.0.5-rc.3"
__version__ = "0.0.5-rc.4"
7 changes: 5 additions & 2 deletions src/tools/gophish_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,12 @@ def export_user_reports(api, assessment_id):
for click in campaign["clicks"]:
if (
first_report is None
or datetime.strptime(click["time"], "%Y-%m-%dT%H:%M:%S") < first_report
or datetime.strptime(click["time"].split(".")[0], "%Y-%m-%dT%H:%M:%S")
< first_report
):
first_report = datetime.strptime(click["time"], "%Y-%m-%dT%H:%M:%S")
first_report = datetime.strptime(
click["time"].split(".")[0], "%Y-%m-%dT%H:%M:%S"
)

user_report_doc["customer"] = None
user_report_doc["assessment"] = assessment_id
Expand Down

0 comments on commit 2898f62

Please sign in to comment.