From 42692add53e2639544de763424b0a128df8288f7 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 26 Feb 2018 15:00:54 +0000 Subject: [PATCH] Bug 18674: Added timezone information to about page Before patch: No timezone section After patch: timezone section at bottom of Server information tab. Actual is what is being used. Config overrides environment variables. So if there is confusion why the environment variables aren't working, it will be visible why. --- about.pl | 7 +++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/about.pl b/about.pl index 25fd54d..83f7372 100755 --- a/about.pl +++ b/about.pl @@ -61,6 +61,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my $time_zone = { + actual => C4::Context->timezone(), + config => C4::Context->config('timezone'), + environment => $ENV{TZ}, +}; +$template->param( 'time_zone' => $time_zone ); + my $perl_path = $^X; if ($^O ne 'VMS') { $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 2d2992f..72858ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -111,6 +111,10 @@ [% ELSIF (errZebraConnection) %] Warning Error message from Zebra: [% ( errZebraConnection ) %] [% END %] + Time zone: + Used: [% time_zone.actual %]
+ Config: [% time_zone.config %]
+ ENV: [% time_zone.environment %]
-- 2.1.4