Skip to content

Commit f8205ee

Browse files
authored
Format datetime as ISO8601 (#45)
IR-803
1 parent 50bf5a5 commit f8205ee

File tree

1 file changed

+3
-1
lines changed
  • api_client/python/timesketch_api_client

1 file changed

+3
-1
lines changed

api_client/python/timesketch_api_client/search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,9 @@ def to_pandas(self):
11271127

11281128
data_frame = pandas.DataFrame(return_list)
11291129
try:
1130-
data_frame["datetime"] = pandas.to_datetime(data_frame.datetime, utc=True)
1130+
data_frame["datetime"] = pandas.to_datetime(
1131+
data_frame.datetime, utc=True, format="ISO8601", errors="coerce"
1132+
)
11311133
except pandas.errors.OutOfBoundsDatetime:
11321134
pass
11331135

0 commit comments

Comments
 (0)