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 {