From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3D5EA90738 for ; Wed, 15 Mar 2023 13:27:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1E5399BD6 for ; Wed, 15 Mar 2023 13:27:12 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 15 Mar 2023 13:27:11 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 30261416ED for ; Wed, 15 Mar 2023 13:27:11 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Wed, 15 Mar 2023 13:26:36 +0100 Message-Id: <20230315122635.286988-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.076 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [country.pl] Subject: [pve-devel] [PATCH installer] fix #4430: add UTC timezone as option to installer X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2023 12:27:12 -0000 The 'Etc/UTC' timezone does not have a definite 2-letter country code assigned. 'xx' was choosen on the basis that this hopefully will never be assigned to any real country in the future, but a small collision check won't hurt either. This also means it does not have an entry in either the ISO-codes definition file nor the zoneinfo table, thus needing to define it manually. Using just 'UTC' as timezone (name) also matches what PVE/PMG/PBS do in their UI. Signed-off-by: Christoph Heiss --- Some bike-shedding: If there is a better suggestion on what country code to choose, I'll happily change it. Also, although the correct timezone name is 'Etc/UTC', I chose 'UTC' as "country name" to display in the installer to make it easier to find for users, as they probably will just type 'UTC' in there at first, rather than 'Etc'. country.pl | 4 ++++ proxinstall | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/country.pl b/country.pl index b1a2d62..ffa47d2 100755 --- a/country.pl +++ b/country.pl @@ -72,3 +72,7 @@ foreach my $cc (sort keys %$country) { my $mir = $mirrors->{$cc} || ''; print "$cc:$country->{$cc}:$map:$mir:\n"; } + +die "UTC fake country code collision: $country->{xx}\n" + if defined($country->{xx}); +print "xx:UTC:::\n"; diff --git a/proxinstall b/proxinstall index 79abc34..9000178 100755 --- a/proxinstall +++ b/proxinstall @@ -690,6 +690,10 @@ sub read_cmap { } close ($TMP); + $cczones->{xx}->{UTC} = 1; + $country->{xx}->{zone} = 'UTC'; + $zones->{UTC} = 1; + return { zones => $zones, cczones => $cczones, -- 2.39.2