[pve-devel] [PATCH v2 installer] fix #4430: add UTC timezone as option to installer
Christoph Heiss
c.heiss at proxmox.com
Thu Mar 16 11:01:36 CET 2023
Adds 'Etc/UTC' as option to the timezone selection, regardless of what
country is selected.
The 'Etc/' prefix needs to be stripped for the installation, as this
value is written to /etc/timezone. PVE/PMG/PBS already use 'UTC' without
the prefix, so avoid regressing them.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Would it be sensible to fix up the timezone change component in the UI
so that it uses 'Etc/UTC' (which is the canonical timezone name for UTC)
as well? As separate patch in the future, of course.
v1: https://lists.proxmox.com/pipermail/pve-devel/2023-March/056202.html
proxinstall | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxinstall b/proxinstall
index 79abc34..899b534 100755
--- a/proxinstall
+++ b/proxinstall
@@ -2658,6 +2658,7 @@ sub update_zonelist {
$cb->signal_connect('changed' => sub {
$timezone = $cb->get_active_text();
+ $timezone =~ s|Etc/UTC|UTC|;
});
my @za;
@@ -2674,6 +2675,9 @@ sub update_zonelist {
$i++;
}
+ # Append Etc/UTC here, so it is always the last item and never the default for any country.
+ $cb->append_text('Etc/UTC');
+
$cb->set_active($ind || 0);
$cb->show;
--
2.39.2
More information about the pve-devel
mailing list