https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23079

--- Comment #10 from Jonathan Druart <[email protected]> 
---
(In reply to M. Tompsett from comment #9)
> Comment on attachment 90940 [details] [review]
> Bug 23079: Handle invalid timezones when adding/subtracting durations
> 
> Review of attachment 90940 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: Koha/Patron.pm
> @@ +622,4 @@
> >      return 0 unless $delay;
> >      return 0 unless $self->dateexpiry;
> >      return 0 if $self->dateexpiry =~ '^9999';
> > +    return 1 if dt_from_string( $self->dateexpiry, undef, 'floating' 
> > )->subtract( days => $delay ) < dt_from_string(undef, undef, 
> > 'floating')->truncate( to => 'day' );
> 
> I'd prefer GMT.

Why?

> ::: acqui/duplicate_orders.pl
> @@ +74,4 @@
> >  
> >  unless ( $input->param('from') ) {
> >      # Fill the form with year-1
> > +    $from_placed_on->set_time_zone('floating')->subtract( years => 1 );
> 
> Why not:
> $from_placed_on->set_year($from_placed_on->year() - 1);
> -- no timezone needed.

Hum? I do not understand how it will fix the problem.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to