@@ -, +, @@ fails --------- -- fails for PEGI 15 after 9pm. -- works. --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -3927,7 +3927,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); } --