@@ -, +, @@ durations - in tests => Not a big deal (for now) - called on a datetime, so it will explode if called at midnight --- Koha/Patron.pm | 2 +- acqui/duplicate_orders.pl | 2 +- acqui/histsearch.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -657,7 +657,7 @@ sub is_going_to_expire { return 0 unless $delay; return 0 unless $self->dateexpiry; return 0 if $self->dateexpiry =~ '^9999'; - return 1 if dt_from_string( $self->dateexpiry )->subtract( days => $delay ) < dt_from_string->truncate( to => 'day' ); + return 1 if dt_from_string( $self->dateexpiry, undef, 'floating' )->subtract( days => $delay ) < dt_from_string(undef, undef, 'floating')->truncate( to => 'day' ); return 0; } --- a/acqui/duplicate_orders.pl +++ a/acqui/duplicate_orders.pl @@ -74,7 +74,7 @@ my $to_placed_on = unless ( $input->param('from') ) { # Fill the form with year-1 - $from_placed_on->subtract( years => 1 ); + $from_placed_on->set_time_zone('floating')->subtract( years => 1 ); } $filters->{from_placed_on} = output_pref( { dt => $from_placed_on, dateformat => 'iso', dateonly => 1 } ), --- a/acqui/histsearch.pl +++ a/acqui/histsearch.pl @@ -94,7 +94,7 @@ my $from_placed_on = eval { dt_from_string( scalar $input->param('from') ) } || my $to_placed_on = eval { dt_from_string( scalar $input->param('to') ) } || dt_from_string; unless ( $input->param('from') ) { # Fill the form with year-1 - $from_placed_on->subtract( years => 1 ); + $from_placed_on->set_time_zone('floating')->subtract( years => 1 ); } $filters->{from_placed_on} = output_pref( { dt => $from_placed_on, dateformat => 'iso', dateonly => 1 } ), $filters->{to_placed_on} = output_pref( { dt => $to_placed_on, dateformat => 'iso', dateonly => 1 } ), --