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 <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Mark Tompsett 2018-02-26 15:00:54 +00:00 committed by Jonathan Druart
parent 015e7ee333
commit e8ac2d3833
2 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -111,6 +111,10 @@
[% ELSIF (errZebraConnection) %]
<tr><th scope="row"><b>Warning</b> </th><td>Error message from Zebra: [% ( errZebraConnection ) %] </td></tr>
[% END %]
<tr><th scope="row">Time zone: </th>
<td>Used: [% time_zone.actual %]<br/>
Config: [% time_zone.config %]<br/>
ENV: [% time_zone.environment %]</td></tr>
</table>
</div>
<div id="perl">