mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Cleanup setting of the timezone
This commit is contained in:
parent
19a20ab8e3
commit
482174d5e9
@ -10,7 +10,7 @@ import useSWR from 'swr';
|
|||||||
|
|
||||||
export default function Recording({ camera, date, hour = '00', minute = '00', second = '00' }) {
|
export default function Recording({ camera, date, hour = '00', minute = '00', second = '00' }) {
|
||||||
const { data: config } = useSWR('config');
|
const { data: config } = useSWR('config');
|
||||||
const timezone = config?.ui?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
let timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
const currentDate = useMemo(
|
const currentDate = useMemo(
|
||||||
() => (date ? parseISO(`${date}T${hour || '00'}:${minute || '00'}:${second || '00'}`) : new Date()),
|
() => (date ? parseISO(`${date}T${hour || '00'}:${minute || '00'}:${second || '00'}`) : new Date()),
|
||||||
[date, hour, minute, second]
|
[date, hour, minute, second]
|
||||||
@ -114,10 +114,14 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
|
|||||||
}
|
}
|
||||||
}, [seekSeconds, playlistIndex]);
|
}, [seekSeconds, playlistIndex]);
|
||||||
|
|
||||||
if (!recordingsSummary || !recordings) {
|
if (!recordingsSummary || !recordings || !config) {
|
||||||
return <ActivityIndicator />;
|
return <ActivityIndicator />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.ui.timezone) {
|
||||||
|
timezone = config.ui.timezone;
|
||||||
|
}
|
||||||
|
|
||||||
if (recordingsSummary.length === 0) {
|
if (recordingsSummary.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user