Usage of /etc/timezone is deprecated. The tzdata maintainers recommend switching to timedatectl.
This changes the use of INotify to the Systemd module for timezone settings. Suggested-by: Fabian Grünbichler <[email protected]> Suggested-by: Maximiliano Sandroval <[email protected]> Signed-off-by: Stefan Mayr <[email protected]> --- src/PMG/API2/Nodes.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PMG/API2/Nodes.pm b/src/PMG/API2/Nodes.pm index 3479d64..66c4c3b 100644 --- a/src/PMG/API2/Nodes.pm +++ b/src/PMG/API2/Nodes.pm @@ -662,7 +662,7 @@ __PACKAGE__->register_method({ my $ctime = time(); my $ltime = timegm_nocheck(localtime($ctime)); my $res = { - timezone => PVE::INotify::read_file('timezone'), + timezone => PVE::Systemd::get_timezone(), time => time(), localtime => $ltime, }; @@ -693,7 +693,7 @@ __PACKAGE__->register_method({ code => sub { my ($param) = @_; - PVE::INotify::write_file('timezone', $param->{timezone}); + PVE::Systemd::set_timezone($param->{timezone}); return undef; }, -- 2.34.1 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
