Bugzilla – Attachment 68923 Details for
Bug 19176
Dates comparison fails on slow server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19176: (QA follow-up) few cosmetic changes
Bug-19176-QA-follow-up-few-cosmetic-changes.patch (text/plain), 1.31 KB, created by
Jonathan Druart
on 2017-11-03 16:52:22 UTC
(
hide
)
Description:
Bug 19176: (QA follow-up) few cosmetic changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-11-03 16:52:22 UTC
Size:
1.31 KB
patch
obsolete
>From f1d1d40be196166494384d17b0368b60ae207088 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 Nov 2017 13:50:27 -0300 >Subject: [PATCH] Bug 19176: (QA follow-up) few cosmetic changes > >--- > t/lib/Dates.pm | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/t/lib/Dates.pm b/t/lib/Dates.pm >index 330d5c58a1..66299d9eb1 100644 >--- a/t/lib/Dates.pm >+++ b/t/lib/Dates.pm >@@ -1,7 +1,6 @@ > package t::lib::Dates; > > use Modern::Perl; >-use Test::More; > use Koha::DateUtils; > use DateTime; > >@@ -13,19 +12,19 @@ t::lib::Dates.pm - test helper module for working with dates > > =head2 compare > >- compare( $got_dt, $expected_dt, $test_description ); >+ compare( $got_dt, $expected_dt ); > > Will execute a test and compare the 2 dates given in parameters >-The date will be compared truncated to minutes >+The dates will be considered as identical if there are less than 5sec between them. > > =cut > > sub compare { >- my ( $got, $expected, $description ) = @_; >+ my ( $got, $expected ) = @_; > my $dt_got = dt_from_string($got); > my $dt_expected = dt_from_string($expected); > my $diff = $dt_got->epoch - $dt_expected->epoch; >- if ( abs($diff) < 6 ) { return 0 } >+ if ( abs($diff) <= 5 ) { return 0 } > return $diff > 0 ? 1 : -1; > } > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19176
:
66493
|
66563
|
67322
|
68082
|
68412
|
68413
|
68414
|
68448
|
68449
|
68450
|
68848
| 68923