From bb414524ad3745675c5db2afec4117ad1d19b0fe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 May 2024 08:14:58 -0400 Subject: [PATCH] Add fallback if timedatectl can't run. --- confluent_server/confluent/selfservice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index a166e0fb..438d5b3e 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -378,6 +378,8 @@ def handle_request(env, start_response): tdc = util.run(['timedatectl'])[0].split(b'\n') except subprocess.CalledProcessError: tdc = [] + currtzvintage = time.time() + ncfg['timezone'] = currtz for ent in tdc: ent = ent.strip() if ent.startswith(b'Time zone:'):