Bugzilla – Attachment 156788 Details for
Bug 27249
Using the calendar to 'close' a library can create an infinite loop during renewals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27249: Replace DateTime->now by dt_from_string
Bug-27249-Replace-DateTime-now-by-dtfromstring.patch (text/plain), 1.42 KB, created by
Julian Maurice
on 2023-10-10 11:07:38 UTC
(
hide
)
Description:
Bug 27249: Replace DateTime->now by dt_from_string
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-10-10 11:07:38 UTC
Size:
1.42 KB
patch
obsolete
>From 4290a97f1c1a8dd2282b0cc184ae17408986e856 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 10 Oct 2023 11:53:17 +0200 >Subject: [PATCH] Bug 27249: Replace DateTime->now by dt_from_string > >--- > 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.30.2
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 27249
:
153585
|
153682
|
154728
|
154920
|
154921
|
156786
|
156787
|
156788
|
157163
|
157164
|
157165
|
157166
|
157167