Bug 4969: Cursor should be pointer for links
[koha.git] / Koha / Calendar.pm
index 0065044..f6cb58c 100644 (file)
@@ -72,7 +72,7 @@ sub exception_holidays {
             day       => $day,
             month     => $month,
             year      => $year,
-            time_zone => C4::Context->tz()
+            time_zone => "floating",
           )->truncate( to => 'day' );
     }
     $self->{exception_holidays} =
@@ -118,14 +118,14 @@ sub single_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 ) {
@@ -235,6 +235,8 @@ sub is_holiday {
     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' );