Skip to content

Commit

Permalink
fix: event time is already a date
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Mar 8, 2024
1 parent 5b33619 commit f120a85
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public void indexEvent(final Map<String, Object> event, final ReportingContext c
return;
}

final Long eventTimeMillis = (Long) event.get("event_time");
final Date eventTimeMillis = (Date) event.get("event_time");

Map<String, Object> preparedEvent = new HashMap<>();
preparedEvent.put("event_time", eventTimeMillis);
preparedEvent.put("event_time_iso", sdf.format(new Date(eventTimeMillis)));
preparedEvent.put("event_time", event.get("event_time"));
preparedEvent.put("event_time_iso", sdf.format(eventTimeMillis));
preparedEvent.put("component_type", event.get("component_type"));
preparedEvent.put("component_url", event.get("component_url"));
preparedEvent.put("component_name", event.get("component_name"));
Expand Down

0 comments on commit f120a85

Please sign in to comment.