From f2eb8f13421019028ecef5583e296ac9eb8f285e Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Mon, 13 Jun 2022 23:24:32 -0400 Subject: [PATCH] Fixed uptime in System-->Status and added time zone info. --- bazarr/api/system/status.py | 2 ++ frontend/src/pages/System/Status/index.tsx | 3 ++- frontend/src/types/system.d.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bazarr/api/system/status.py b/bazarr/api/system/status.py index b5181f032..7f5b87d98 100644 --- a/bazarr/api/system/status.py +++ b/bazarr/api/system/status.py @@ -5,6 +5,7 @@ import platform from flask import jsonify from flask_restful import Resource +from tzlocal import get_localzone_name from radarr.info import get_radarr_info from sonarr.info import get_sonarr_info @@ -34,5 +35,6 @@ class SystemStatus(Resource): os.path.dirname(__file__))))}) system_status.update({'bazarr_config_directory': args.config_dir}) system_status.update({'start_time': startTime}) + system_status.update({'timezone': get_localzone_name() or 'Undefined'}) return jsonify(data=system_status) diff --git a/frontend/src/pages/System/Status/index.tsx b/frontend/src/pages/System/Status/index.tsx index c3352f9e0..fca4f1e48 100644 --- a/frontend/src/pages/System/Status/index.tsx +++ b/frontend/src/pages/System/Status/index.tsx @@ -89,7 +89,7 @@ const SystemStatusView: FunctionComponent = () => { interval.start(); return interval.stop(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [interval]); useDocumentTitle("Status - Bazarr (System)"); @@ -115,6 +115,7 @@ const SystemStatusView: FunctionComponent = () => { {status?.bazarr_config_directory} {uptime} + {status?.timezone} diff --git a/frontend/src/types/system.d.ts b/frontend/src/types/system.d.ts index 2c193cf33..dc4e33799 100644 --- a/frontend/src/types/system.d.ts +++ b/frontend/src/types/system.d.ts @@ -18,6 +18,7 @@ declare namespace System { radarr_version: string; sonarr_version: string; start_time: number; + timezone: string; } interface Backups {