Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails
It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15 after 9pm. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
7922ff0368
commit
73f55165be
|
|
@ -4048,7 +4048,8 @@ sub GetAgeRestriction {
|
|||
}
|
||||
|
||||
#Get how many days the borrower has to reach the age restriction
|
||||
my $daysToAgeRestriction = Date_to_Days(@alloweddate) - Date_to_Days(Today);
|
||||
my @Today = split /-/, DateTime->today->ymd();
|
||||
my $daysToAgeRestriction = Date_to_Days(@alloweddate) - Date_to_Days(@Today);
|
||||
#Negative days means the borrower went past the age restriction age
|
||||
return ($restriction_year, $daysToAgeRestriction);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue