[Koha-bugs] [Bug 19176] Dates comparison fails on slow server

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 23 16:46:31 CEST 2017


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

--- Comment #16 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to M. Tompsett from comment #11)
> Typo: comparison.

Fixed.

> ::: t/lib/Dates.pm
> @@ +19,5 @@
> > +    my $dt_expected = dt_from_string($expected);
> > +    $dt_got->set_time_zone('floating');
> > +    $dt_expected->set_time_zone('floating');
> > +    my $diff = $dt_got->epoch - $dt_expected->epoch;
> > +    if ( abs($diff) < 60 ) { return 0 }
> 
> A slow server isn't going to have a 15+ second gap, I believe this 60 could
> be smaller.

Reduced to 5.

(In reply to Magnus Enger from comment #12)
> How can this be tested? Just run the tests in t/db_dependent/Patrons.t and
> t/db_dependent/Virtualshelves.t?

yes, and t/Test/Dates.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list