Bug 18674: TZ error handling
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 Apr 2018 19:29:23 +0000 (16:29 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Apr 2018 19:45:08 +0000 (16:45 -0300)
commitb068259521ebea158e8b664cfbab46d5a65495ff
treea12c80d1187a207947e25ea5700ea5361512c226
parent7513c70ef04f9326a8f726556788ea85c098ae60
Bug 18674: TZ error handling

This patch adds C4::Context->timezone bad timezone handling.
The calculated 'effective' timezone is tested with the right tool and a
fallback to 'local' is added. A warning is printed in the logs.

A test for this is added to about.pl too, along with the right warning
messages in case of problems.

Tests are added for both invalid TZ and to make sure the warning is
raised.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/timezones.t
=> SUCCESS: All tests pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Context.pm
about.pl
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
t/timezones.t