mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 02:05:21 +03:00
moved timezone & locales to format function
This commit is contained in:
parent
3df9520486
commit
397e657a0a
@ -287,9 +287,6 @@ export default function Events({ path, ...props }) {
|
|||||||
return <ActivityIndicator />;
|
return <ActivityIndicator />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const timezone = config.ui?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
||||||
const locale = window.navigator?.language || 'en-US';
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4 p-2 px-4 w-full">
|
<div className="space-y-4 p-2 px-4 w-full">
|
||||||
<Heading>Events</Heading>
|
<Heading>Events</Heading>
|
||||||
@ -508,7 +505,7 @@ export default function Events({ path, ...props }) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="text-sm flex">
|
<div className="text-sm flex">
|
||||||
<Clock className="h-5 w-5 mr-2 inline" />
|
<Clock className="h-5 w-5 mr-2 inline" />
|
||||||
{formatUnixTimestampToDateTime(event.start_time, locale, timezone, config.ui?.use12hour)}
|
{formatUnixTimestampToDateTime(event.start_time, { ...config.ui })}
|
||||||
<div className="hidden md:inline">
|
<div className="hidden md:inline">
|
||||||
<span className="m-1">-</span>
|
<span className="m-1">-</span>
|
||||||
<TimeAgo time={event.start_time * 1000} dense />
|
<TimeAgo time={event.start_time * 1000} dense />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user