From 26c042fd28fee57d18fbc13494b1f0936fd98e7a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:11:13 +0200 Subject: [PATCH] pre-fill the timezone Signed-off-by: Simon L --- php/public/timezone.js | 7 +++++++ php/templates/containers.twig | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 php/public/timezone.js diff --git a/php/public/timezone.js b/php/public/timezone.js new file mode 100644 index 00000000..b43bdfe7 --- /dev/null +++ b/php/public/timezone.js @@ -0,0 +1,7 @@ +document.addEventListener("DOMContentLoaded", function(event) { + // timezone + let timezone = document.getElementById("timezone"); + if (timezone) { + timezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone + } +}); diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 5f9869bd..477e718f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -24,6 +24,9 @@ {# Add domain-prefill #} + {# timezone-prefill #} + + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} {% set isWatchtowerRunning = false %} @@ -647,7 +650,7 @@ In order to get the correct time values for certain Nextcloud features, it makes sense to set the timezone for Nextcloud to the one that your users mainly use. Please note that this setting does not apply to the mastercontainer and any backup option.

You can configure the timezone for Nextcloud below:

- +