fix #3199: by fixing usage of strftime
In a very early version I wanted to parse the date from the backup name, and when switching to using the ctime and localtime() instead, I forgot to update the usage of strftime. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
32dbc619a5
commit
189e67ffa6
@ -1697,8 +1697,8 @@ sub prune_mark_backup_group {
|
||||
$prune_mark->($prune_list, $keep->{'keep-weekly'}, sub {
|
||||
my ($ctime) = @_;
|
||||
my ($sec, $min, $hour, $day, $month, $year) = localtime($ctime);
|
||||
my $iso_week = int(strftime("%V", $sec, $min, $hour, $day, $month - 1, $year - 1900));
|
||||
my $iso_week_year = int(strftime("%G", $sec, $min, $hour, $day, $month - 1, $year - 1900));
|
||||
my $iso_week = int(strftime("%V", $sec, $min, $hour, $day, $month, $year));
|
||||
my $iso_week_year = int(strftime("%G", $sec, $min, $hour, $day, $month, $year));
|
||||
return "$iso_week/$iso_week_year";
|
||||
});
|
||||
$prune_mark->($prune_list, $keep->{'keep-monthly'}, sub {
|
||||
|
||||
Reference in New Issue
Block a user