Bugzilla – Attachment 94766 Details for
Bug 23382
Issuing rules failing after bug 20912
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23382: Use floating time zone to prevent tests to fail because of DST
Bug-23382-Use-floating-time-zone-to-prevent-tests-.patch (text/plain), 1.23 KB, created by
Jonathan Druart
on 2019-10-25 13:32:41 UTC
(
hide
)
Description:
Bug 23382: Use floating time zone to prevent tests to fail because of DST
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-10-25 13:32:41 UTC
Size:
1.23 KB
patch
obsolete
>From a3dccb8565c6d2041aaa6338341402adbd5e3eeb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 25 Oct 2019 15:28:49 +0200 >Subject: [PATCH] Bug 23382: Use floating time zone to prevent tests to fail > because of DST > >Today Friday Oct 25th, DST next Sunday => Date math are wrong, 96 hours >diff becomes 95. >To avoid that we use the floating timezone > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Charges/Fees.t | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Charges/Fees.t b/t/db_dependent/Koha/Charges/Fees.t >index b67b552f42..2a7b7e1b09 100644 >--- a/t/db_dependent/Koha/Charges/Fees.t >+++ b/t/db_dependent/Koha/Charges/Fees.t >@@ -90,11 +90,11 @@ my $patron = $builder->build_object( > } > ); > >-my $dt = dt_from_string(); >-Time::Fake->offset( $dt->epoch ); >+my $now = dt_from_string()->set_time_zone('floating'); >+Time::Fake->offset( $now->epoch ); > >-my $dt_from = dt_from_string()->subtract( days => 2 ); >-my $dt_to = dt_from_string()->add( days => 4 ); >+my $dt_from = $now->clone->subtract( days => 2 ); >+my $dt_to = $now->clone->add( days => 4 ); > > subtest 'new' => sub { > plan tests => 9; >-- >2.11.0
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 23382
:
92221
|
92222
|
92236
|
92237
|
92238
|
92273
|
92274
|
92275
|
92276
|
93407
|
93408
|
93409
|
93410
|
93411
|
93412
|
94281
|
94282
|
94283
|
94284
|
94285
|
94286
|
94287
|
94288
|
94289
|
94723
|
94724
|
94725
|
94726
|
94727
|
94728
|
94729
|
94730
|
94731
|
94743
|
94755
|
94756
|
94757
|
94758
|
94759
|
94760
|
94761
|
94762
|
94763
|
94764
|
94765
|
94766
|
94774
|
94775
|
94776
|
94777
|
94778
|
94779
|
94780
|
94781
|
94782
|
94783
|
94784
|
107456
|
107457