all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Mayr <stefan@mayr-stefan.de>
To: pve-devel@lists.proxmox.com
Subject: [PATCH common v3 2/2] Fix #7175: replace timezone handling with systemd timedatectl
Date: Sun, 22 Feb 2026 12:02:05 +0100	[thread overview]
Message-ID: <20260222110205.582-3-stefan@mayr-stefan.de> (raw)
In-Reply-To: <20260220124809.076116bb@rosa.proxmox.com>

Usage of /etc/timezone is deprecated. The tzdata maintainers recommend
switching to timedatectl.

This removes the deprecated handling of /etc/timezone from the INotify
module.

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Suggested-by: Maximiliano Sandroval <m.sandoval@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Stefan Mayr <stefan@mayr-stefan.de>
---
 src/PVE/INotify.pm | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index fdec8f1..03c871c 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -651,37 +651,6 @@ register_file(
     \&update_etc_resolv_conf,
 );
 
-# Deprecated: use PVE::Systemd::get_timezone() instead
-sub read_etc_timezone {
-    my ($filename, $fd) = @_;
-
-    my $timezone = <$fd>;
-
-    chomp $timezone;
-
-    return $timezone;
-}
-
-# Deprecated: use PVE::Systemd::set_timezone($timezone) instead
-sub write_etc_timezone {
-    my ($filename, $fh, $timezone) = @_;
-
-    my $tzinfo = "/usr/share/zoneinfo/$timezone";
-
-    raise_param_exc({ 'timezone' => "No such timezone" })
-        if (!-f $tzinfo);
-
-    ($timezone) = $timezone =~ m/^(.*)$/; # untaint
-
-    print $fh "$timezone\n";
-
-    unlink("/etc/localtime");
-    symlink("/usr/share/zoneinfo/$timezone", "/etc/localtime");
-
-}
-
-register_file('timezone', "/etc/timezone", \&read_etc_timezone, \&write_etc_timezone);
-
 sub read_active_workers {
     my ($filename, $fh) = @_;
 
-- 
2.34.1




      parent reply	other threads:[~2026-02-22 11:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25 21:01 [pve-devel] [PATCH common, container, manager and pmg-api v2 0/4] " Stefan Mayr
2026-01-25 21:01 ` [pve-devel] [PATCH manager v2 1/4] " Stefan Mayr
2026-01-25 21:01 ` [pve-devel] [PATCH container v2 2/4] " Stefan Mayr
2026-01-25 21:01 ` [pve-devel] [PATCH pmg-api v2 3/4] " Stefan Mayr
2026-01-25 21:01 ` [pve-devel] [PATCH common v2 4/4] " Stefan Mayr
2026-02-18 19:53 ` [pve-devel] [PATCH common, container, manager and pmg-api v2 0/4] " Stefan Mayr
2026-02-19  8:13   ` Fabian Grünbichler
2026-02-20 11:48 ` Stoiko Ivanov
2026-02-22 11:02   ` [PATCH common v3 0/2] " Stefan Mayr
2026-02-23 10:02     ` Stoiko Ivanov
2026-02-22 11:02   ` [PATCH common v3 1/2] " Stefan Mayr
2026-02-22 11:02   ` Stefan Mayr [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260222110205.582-3-stefan@mayr-stefan.de \
    --to=stefan@mayr-stefan.de \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.ivanov@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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