]> git.proxmox.com Git - pve-storage.git/commit
archive_info: use timelocal correctly
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 8 Jul 2020 08:22:19 +0000 (10:22 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Jul 2020 08:45:49 +0000 (10:45 +0200)
commitb1ddc54a937d45cf419dc3ab5767c6767eec9791
tree5558a1593f6940cf763b3f935127c6c0d34c404a
parente0bbbb6f480593c0dbaf4efde336ad1f1a193ff0
archive_info: use timelocal correctly

Because we always have 4-digit years, we can simply pass
the year itself to timelocal instead of subtracting 1900.
Like this it will also work for years not in the range 2000-2999.

See also:
https://perldoc.perl.org/Time/Local.html#Year-Value-Interpretation

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm
test/archive_info_test.pm