day => $day,
month => $month,
year => $year,
- time_zone => C4::Context->tz()
+ time_zone => "floating",
)->truncate( to => 'day' );
}
$self->{exception_holidays} =
day => $day,
month => $month,
year => $year,
- time_zone => C4::Context->tz()
+ time_zone => 'floating',
)->truncate( to => 'day' );
push @ymd_arr, $dt->ymd('');
}
$single_holidays->{$br} = \@ymd_arr;
} # br
$cache->set_in_cache( 'single_holidays', $single_holidays,
- 76800 ) #24 hrs ;
+ { expiry => 76800 } ) #24 hrs ;
}
my $holidays = ( $single_holidays->{$branchcode} );
for my $hols (@$holidays ) {
my $day = $localdt->day;
my $month = $localdt->month;
+ #Change timezone to "floating" before doing any calculations or comparisons
+ $localdt->set_time_zone("floating");
$localdt->truncate( to => 'day' );