From 1a2288052dab4709ba5c1236bc8141384e2d1aa5 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 10 Oct 2023 11:53:17 +0200 Subject: [PATCH] Bug 27249: Replace DateTime->now by dt_from_string Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Holidays.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t index 42c2ce604e..db169e8e2a 100755 --- a/t/db_dependent/Holidays.t +++ b/t/db_dependent/Holidays.t @@ -289,7 +289,7 @@ subtest 'with a library that is never open' => sub { $calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); } - my $now = DateTime->now; + my $now = dt_from_string; subtest 'next_open_days should throw an exception' => sub { my $kcalendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => 'Calendar' ); @@ -315,7 +315,7 @@ subtest 'with a library that is *almost* never open' => sub { $calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); } - my $now = DateTime->now; + my $now = dt_from_string; my $open_day_in_the_future = $now->clone()->add( years => 1 ); my $open_day_in_the_past = $now->clone()->subtract( years => 1 ); $calendar->insert_exception_holiday( date => $open_day_in_the_future->ymd, title => '', description => '' ); -- 2.39.2