diff --git a/owrx/controllers/services.py b/owrx/controllers/services.py
index 04b631f1..e7070ec6 100644
--- a/owrx/controllers/services.py
+++ b/owrx/controllers/services.py
@@ -17,6 +17,8 @@ logger = logging.getLogger(__name__)
class ServiceController(AuthorizationMixin, WebpageController):
+ timeStarted = time.time()
+
def indexAction(self):
self.serve_template("services.html", **self.template_variables())
@@ -44,6 +46,11 @@ class ServiceController(AuthorizationMixin, WebpageController):
status=ServiceController.renderStatus()
)
+ # Get last started timestamp
+ @staticmethod
+ def lastStarted():
+ return ServiceController.timeStarted
+
@staticmethod
def lastBooted():
try:
@@ -66,8 +73,10 @@ class ServiceController(AuthorizationMixin, WebpageController):
if ts > 0:
ts = ServiceController.renderTime(ts)
result += "
System booted at {0}.
\n".format(ts)
- ts = ServiceController.renderTime(EIBI.lastStarted())
- result += "Server started at {0}.
\n".format(ts)
+ ts = ServiceController.lastStarted()
+ if ts > 0:
+ ts = ServiceController.renderTime(ts)
+ result += "Server started at {0}.
\n".format(ts)
ts = EIBI.lastDownloaded()
if ts > 0:
ts = ServiceController.renderTime(ts)
diff --git a/owrx/eibi.py b/owrx/eibi.py
index 11dffd7e..e4242f68 100644
--- a/owrx/eibi.py
+++ b/owrx/eibi.py
@@ -24,7 +24,6 @@ MAX_DISTANCE = 25000
class EIBI(object):
sharedInstance = None
creationLock = threading.Lock()
- timeStarted = time.time()
@staticmethod
def getSharedInstance():
@@ -38,11 +37,6 @@ class EIBI(object):
coreConfig = CoreConfig()
return "{data_directory}/eibi.json".format(data_directory=coreConfig.get_data_directory())
- # Get last started timestamp
- @staticmethod
- def lastStarted():
- return EIBI.timeStarted
-
# Get last downloaded timestamp or 0 for none
@staticmethod
def lastDownloaded():