Update date-fns and date-fns-tz to v3

This commit is contained in:
Felipe Santos
2024-06-05 22:37:54 -03:00
parent c789e76ffb
commit 1a36ce0894
28 changed files with 89 additions and 138 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import utcToZonedTime from 'date-fns-tz/utcToZonedTime';
import { toZonedTime } from 'date-fns-tz';
import { CameraConfig } from '../../config/types';
import { ClipsOrSnapshots } from '../../types';
import { formatDateAndTime, prettifyTitle } from '../../utils/basic';
@@ -18,7 +18,7 @@ export const getEventTitle = (event: FrigateEvent): string => {
const score = event.top_score !== null ? ` ${Math.round(event.top_score * 100)}%` : '';
return `${formatDateAndTime(
utcToZonedTime(event.start_time * 1000, localTimezone),
toZonedTime(event.start_time * 1000, localTimezone),
)} [${durationSeconds}s, ${prettifyTitle(event.label)}${score}]`;
};