Bugzilla – Attachment 156384 Details for
Bug 34930
Fix timezone problem in Koha/Object.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34930: Change timezone in Koha/Object.t where tests assume it
Bug-34930-Change-timezone-in-KohaObjectt-where-tes.patch (text/plain), 1.43 KB, created by
Katrin Fischer
on 2023-09-29 11:37:07 UTC
(
hide
)
Description:
Bug 34930: Change timezone in Koha/Object.t where tests assume it
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-29 11:37:07 UTC
Size:
1.43 KB
patch
obsolete
>From 00bd47147626ad259b1ff924537e4f2123a09ad0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 27 Sep 2023 13:57:49 +0200 >Subject: [PATCH] Bug 34930: Change timezone in Koha/Object.t where tests > assume it > >This is the case for subtest: attributes_from_api() tests. > >Test plan: >export TZ='Europe/Amsterdam' >prove t/db_dependent/Koha/Object.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > t/db_dependent/Koha/Object.t | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t >index c1b0b379d3..056dbbdfbc 100755 >--- a/t/db_dependent/Koha/Object.t >+++ b/t/db_dependent/Koha/Object.t >@@ -690,6 +690,10 @@ subtest 'attributes_from_api() tests' => sub { > > my $patron = Koha::Patron->new(); > >+ delete $C4::Context::context->{tz}; >+ local %ENV; >+ $ENV{TZ} = 'Etc/UTC'; # following tests implicitly assume it >+ > my $attrs = $patron->attributes_from_api( > { > updated_on => '2019-12-27T14:53:00Z', >@@ -761,6 +765,9 @@ subtest 'attributes_from_api() tests' => sub { > 'date_of_birth', > 'Exception parameter is the API field name, not the DB one' > ); >+ >+ # Remove timezone change >+ delete $C4::Context::context->{tz}; > }; > > subtest 'booleans handling tests' => sub { >-- >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 34930
:
156283
| 156384