From 7f96d89ec48b979de5607e99f47ff3089de756ac Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 24 Apr 2023 04:19:38 -0600 Subject: [PATCH] Use correct method for retrieving current unix time (#6218) --- web/src/components/TimelineSummary.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/components/TimelineSummary.jsx b/web/src/components/TimelineSummary.jsx index 4ebf1117d..8e5af9654 100644 --- a/web/src/components/TimelineSummary.jsx +++ b/web/src/components/TimelineSummary.jsx @@ -7,7 +7,6 @@ import ExitIcon from '../icons/Exit'; import { Zone } from '../icons/Zone'; import { useState } from 'preact/hooks'; import Button from './Button'; -import { getUnixTime } from 'date-fns'; export default function TimelineSummary({ event, onFrameSelected }) { const { data: eventTimeline } = useSWR([ @@ -22,7 +21,7 @@ export default function TimelineSummary({ event, onFrameSelected }) { const [timeIndex, setTimeIndex] = useState(-1); const recordingParams = { - before: event.end_time || getUnixTime(), + before: event.end_time || Date.now(), after: event.start_time, }; const { data: recordings } = useSWR([`${event.camera}/recordings`, recordingParams], { revalidateOnFocus: false });