use C4::Installer;
use Koha;
+use Koha::DateUtils qw(dt_from_string output_pref);
use Koha::Acquisition::Currencies;
use Koha::Patron::Categories;
use Koha::Patrons;
}
);
-my $config_timezone = C4::Context->config('timezone');
+my $config_timezone = C4::Context->config('timezone') // '';
my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone );
-my $env_timezone = $ENV{TZ};
+my $env_timezone = $ENV{TZ} // '';
my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone );
my $actual_bad_tz_fallback = 0;
}
my $time_zone = {
- actual => C4::Context->timezone(),
+ actual => C4::Context->tz->name,
actual_bad_tz_fallback => $actual_bad_tz_fallback,
config => $config_timezone,
config_invalid => $config_invalid,
environment => $env_timezone,
environment_invalid => $env_invalid
};
-$template->param( 'time_zone' => $time_zone );
+
+$template->param(
+ time_zone => $time_zone,
+ current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
+);
my $perl_path = $^X;
if ($^O ne 'VMS') {
[% USE HtmlTags %]
[% USE Koha %]
+[% USE KohaDates %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › About Koha</title>
<tr><th scope="row"><b>Warning</b> </th><td>Error message from Zebra: [% ( errZebraConnection ) %] </td></tr>
[% END %]
<tr>
+ <th scope="row">Date and time: </th>
+ <td>[% current_date_and_time | $KohaDates with_hours => 1 %]</td>
+ </tr>
+ <tr>
[% timezone_config_class = (time_zone.config_invalid) ? 'status_warn' : '' %]
[% timezone_env_class = (time_zone.env_invalid) ? 'status_warn' : '' %]
<th scope="row">Time zone: </th>