Line 0
Link Here
|
0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
|
3 |
use C4::Context; |
4 |
|
5 |
use Test::More tests => 3; |
6 |
use t::lib::Mocks; |
7 |
|
8 |
$ENV{TZ} = q{}; |
9 |
t::lib::Mocks::mock_config( 'timezone', q{} ); |
10 |
is( C4::Context->timezone, 'local', 'Got local timezone with no env or config timezone set' ); |
11 |
|
12 |
$ENV{TZ} = 'Antarctica/Macquarie'; |
13 |
is( C4::Context->timezone, 'Antarctica/Macquarie', 'Got correct timezone using ENV, overrides local time' ); |
14 |
|
15 |
t::lib::Mocks::mock_config( 'timezone', 'Antarctica/South_Pole' ); |
16 |
is( C4::Context->timezone, 'Antarctica/South_Pole', 'Got correct timezone using config, overrides env' ); |