([
+ "recordings/summary",
+ {
+ timezone: timezone,
+ },
+ ]);
+
+ const earliestDate = useMemo(() => {
+ const keys = Object.keys(recordingsSummary || {});
+ return keys.length
+ ? new Date(keys[keys.length - 1]).getTime() / 1000
+ : null;
+ }, [recordingsSummary]);
+
+ if (!cameraStorage || !stats || !totalStorage || !config) {
return;
}
@@ -81,6 +106,16 @@ export default function StorageMetrics({
used={totalStorage.used}
total={totalStorage.total}
/>
+ {earliestDate && (
+
+ Earliest recording available:{" "}
+ {formatUnixTimestampToDateTime(earliestDate, {
+ timezone: timezone,
+ strftime_fmt:
+ config.ui.time_format == "24hour" ? "%d %b %Y" : "%B %d, %Y",
+ })}
+
+ )}