Skip to content

Commit 6b59255

Browse files
committed
Fix time conversion
1 parent 1fc9a18 commit 6b59255

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/firebase_functions/dataconnect_fn.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,14 @@ def _dataconnect_endpoint_handler(
235235

236236
event_auth_type = event_attributes["authtype"]
237237
event_auth_id = event_attributes["authid"]
238+
event_time = _util.timestamp_conversion(event_attributes["time"])
238239

239240
dataconnect_event = Event(
240241
specversion=event_attributes["specversion"],
241242
id=event_attributes["id"],
242243
source=event_attributes["source"],
243244
type=event_attributes["type"],
244-
time=_dt.datetime.strptime(
245-
event_attributes["time"],
246-
"%Y-%m-%dT%H:%M:%S.%f%z",
247-
),
245+
time=event_time,
248246
subject=event_attributes.get("subject"),
249247
location=event_attributes["location"],
250248
project=event_attributes["project"],

0 commit comments

Comments
 (0)