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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4af82d411)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
56a1c93ffc
commit
2419a083fd
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue