From 9c71eb5a1b153e6de705ace28e9ab67a7d7df23d 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. Signed-off-by: Mark Tompsett --- 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 cfc2e32..91292a5 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 cac5002..8d43fae 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