|
Lines 37-42
use C4::Context;
Link Here
|
| 37 |
use C4::Installer; |
37 |
use C4::Installer; |
| 38 |
|
38 |
|
| 39 |
use Koha; |
39 |
use Koha; |
|
|
40 |
use Koha::DateUtils qw(dt_from_string); |
| 40 |
use Koha::Acquisition::Currencies; |
41 |
use Koha::Acquisition::Currencies; |
| 41 |
use Koha::Patron::Categories; |
42 |
use Koha::Patron::Categories; |
| 42 |
use Koha::Patrons; |
43 |
use Koha::Patrons; |
|
Lines 62-70
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 62 |
} |
63 |
} |
| 63 |
); |
64 |
); |
| 64 |
|
65 |
|
| 65 |
my $config_timezone = C4::Context->config('timezone'); |
66 |
my $config_timezone = C4::Context->config('timezone') // ''; |
| 66 |
my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone ); |
67 |
my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone ); |
| 67 |
my $env_timezone = $ENV{TZ}; |
68 |
my $env_timezone = $ENV{TZ} // ''; |
| 68 |
my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone ); |
69 |
my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone ); |
| 69 |
my $actual_bad_tz_fallback = 0; |
70 |
my $actual_bad_tz_fallback = 0; |
| 70 |
|
71 |
|
|
Lines 81-94
elsif ( $config_timezone eq '' &&
Link Here
|
| 81 |
} |
82 |
} |
| 82 |
|
83 |
|
| 83 |
my $time_zone = { |
84 |
my $time_zone = { |
| 84 |
actual => C4::Context->timezone(), |
85 |
actual => C4::Context->tz->name, |
| 85 |
actual_bad_tz_fallback => $actual_bad_tz_fallback, |
86 |
actual_bad_tz_fallback => $actual_bad_tz_fallback, |
| 86 |
config => $config_timezone, |
87 |
config => $config_timezone, |
| 87 |
config_invalid => $config_invalid, |
88 |
config_invalid => $config_invalid, |
| 88 |
environment => $env_timezone, |
89 |
environment => $env_timezone, |
| 89 |
environment_invalid => $env_invalid |
90 |
environment_invalid => $env_invalid |
| 90 |
}; |
91 |
}; |
| 91 |
$template->param( 'time_zone' => $time_zone ); |
92 |
|
|
|
93 |
$template->param( |
| 94 |
time_zone => $time_zone, |
| 95 |
current_date_and_time => dt_from_string() |
| 96 |
); |
| 92 |
|
97 |
|
| 93 |
my $perl_path = $^X; |
98 |
my $perl_path = $^X; |
| 94 |
if ($^O ne 'VMS') { |
99 |
if ($^O ne 'VMS') { |