Bug 27249: Replace DateTime->now by dt_from_string
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
9e2a258f6f
commit
1a2288052d
1 changed files with 2 additions and 2 deletions
|
@ -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 => '' );
|
||||
|
|
Loading…
Reference in a new issue