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>