mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
Use correct method for retrieving current unix time (#6218)
This commit is contained in:
parent
04a22f8283
commit
7f96d89ec4
@ -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 });
|
||||
|
Loading…
Reference in New Issue
Block a user