Timestamps in log

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Taurus61
Posts: 30
Joined: Thu Jun 13, 2019 1:09 pm

Timestamps in log

Post by Taurus61 »

All,

I am running zm on a Rocky Linux 8.5 system and via a webmin alert i started the suggest upgrade to 1.36.21.1
After a successful upgrade https://###.###.###.###/zm gives no response at all.
stop/start zm and stop/start apache doesn't help.
installation of the php-intl package was the trick. Thanks knight-of-ni
But now the timestamps in the log is two hours ahead. Tried set and unset the timezone in php.ini. Tried timezone setting in Mariadb (Europe/Amsterdam) or default-time-zone = 'Europe/Amsterdam' etc. and ofcourse in options in ZM itself but nothing makes the logs look the right way. It stays 2 hours ahead. No coinsidence ofcourse that Amsterdam is +2:00
Someone an idea?
Thanks in advance
Paul
User avatar
iconnor
Posts: 2879
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Timestamps in log

Post by iconnor »

You might try this which is in 1.36.24.

diff --git a/web/includes/config.php.in b/web/includes/config.php.in
index de03da809..c18205b5f 100644
--- a/web/includes/config.php.in
+++ b/web/includes/config.php.in
@@ -150,9 +150,9 @@ require_once('database.php');
require_once('logger.php');
loadConfig();
if (ZM_LOCALE_DEFAULT) {
- $dateFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
- $dateTimeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::LONG);
- $timeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::NONE, IntlDateFormatter::LONG);
+ $dateFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::NONE,ZM_TIMEZONE);
+ $dateTimeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::LONG,ZM_TIMEZONE);
+ $timeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::NONE, IntlDateFormatter::LONG,ZM_TIMEZONE);
}
Post Reply