diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index 67d2a6b568..f6a276f21c 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -327,7 +327,7 @@ sub days_between { # start and end should not be closed days my $days = $start_dt->delta_days($end_dt)->delta_days; - for (my $dt = $start_dt->clone(); + for (my $dt = $start_dt->clone()->set_time_zone('floating'); $dt <= $end_dt; $dt->add(days => 1) ) { @@ -351,7 +351,7 @@ sub hours_between { # take into account open/close times then it would be a duration # of library open hours my $skipped_days = 0; - for (my $dt = $start_dt->clone(); + for (my $dt = $start_dt->clone()->set_time_zone('floating'); $dt <= $end_dt; $dt->add(days => 1) ) {