all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 installer] fix #4430: add UTC timezone as option to installer
@ 2023-03-16 10:01 Christoph Heiss
  2023-03-16 11:33 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2023-03-16 10:01 UTC (permalink / raw)
  To: pve-devel

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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH v2 installer] fix #4430: add UTC timezone as option to installer
  2023-03-16 10:01 [pve-devel] [PATCH v2 installer] fix #4430: add UTC timezone as option to installer Christoph Heiss
@ 2023-03-16 11:33 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-03-16 11:33 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 16/03/2023 um 11:01 schrieb Christoph Heiss:
> 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@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.

IMO no, the Etc/ is mostly a detail of the IANA zone db format/data, but not
really used when talking about UTC or setting the timezone to it.

> 
> v1: https://lists.proxmox.com/pipermail/pve-devel/2023-March/056202.html
> 
>  proxinstall | 4 ++++
>  1 file changed, 4 insertions(+)
> 
>

applied, with a followup that drops the "Etc/" prefix (IMO would mostly confuse
some of our users at best), thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-16 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 10:01 [pve-devel] [PATCH v2 installer] fix #4430: add UTC timezone as option to installer Christoph Heiss
2023-03-16 11:33 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal