[pve-devel] applied: Re: [PATCH storage] archive_info: use timelocal correctly

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 8 10:50:34 CEST 2020


On 08.07.20 10:22, Fabian Ebner wrote:
> 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 at proxmox.com>
> ---
> 
> Hopefully in 3070, Perl isn't full of surprises anymore.
> 
>  PVE/Storage.pm            |  2 +-
>  test/archive_info_test.pm | 30 ++++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 1 deletion(-)
> 
>

applied, thanks!





More information about the pve-devel mailing list