Page 1 of 1

mysql's timezone does not match the system timezone!

Posted: Wed Apr 13, 2022 7:38 pm
by krizzle
Hello,
I recently installed Zoneminder 1.36.14 onto Ubuntu Server 20.04. I followed IConnors video here - https://www.youtube.com/watch?v=RhBsW8HkOG4
After the install I noticed that the timestamp on the videos and the time recorded in the event lists were incorrect. I used

Code: Select all

sudo timedatectl set-timezone <your_time_zone>
to configure the timezone to my location. After doing so the timestamp was correct but the times within the event list were still in UTC time. The log also showed an alert which read "ZoneMinder is not configured properly: mysql's timezone does not match the system timezone! Event lists will display incorrect times." Can anyone help me configure the timezone within mysql so the times match within my setup? Any help is appreciated.

Thanks.

Re: mysql's timezone does not match the system timezone!

Posted: Wed Apr 13, 2022 11:14 pm
by bbunge
That wonderful YouTube video aside there are easier install instructions in the ZM WIKI here: https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x

AS for the timezone issue, your time is likely coming from the php.ini. There is a setting in there to change the timezone but you can also set it in Zoneminder Options - System - Timezone.

Or:
Add timezone to PHP

nano /etc/php/7.X/apache2/php.ini (Note: replace 7.X with your version of PHP)

Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone

[Date]

Defines the default timezone used by the date functions
http://php.net/date.timezone

date.timezone = America/New_York

Re: mysql's timezone does not match the system timezone!

Posted: Thu Apr 14, 2022 7:28 am
by Magic919
MySQL will follow the system TZ unless you specify otherwise. Make sufre you restart the DB after you set the system TZ.