From 74548c6b06b527c9ebb3f1e0de685bb4ec62bc9f Mon Sep 17 00:00:00 2001 From: mako777 <24919651+mako777@users.noreply.github.com> Date: Mon, 4 Aug 2025 11:55:37 +0200 Subject: [PATCH] Correct time zone In audit logs time is in "UTC", this PR sets time zone to the user specified "TZ" environmental variable, if there is no "TZ" set, then defaults to "UTC" --- htdocs/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/index.php b/htdocs/index.php index eaed694a..f12e3c0e 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -33,6 +33,9 @@ $lang = \Ltb\Language::detect_language($lang, $allowed_lang ? array_intersect($languages,$allowed_lang) : $languages); require_once("../lang/$lang.inc.php"); +# Set timezone +date_default_timezone_set(getenv('TZ') ?: 'UTC'); + # Remove default questions if (!$questions_use_default) { unset($messages['questions']['birthday']);