ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone

Bug #1687217 reported by Julen Larrucea
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
zoneminder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When visiting 'http://zoneminder.address/zm', the web browser shows:

ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone

Package: zoneminder 1.30.2-xenial1

Way to reproduce (just follow the install instructions step by step):

On a clean LXD container with Ubuntu 16.04.2
----------------------------------------------

add-apt-repository -y ppa:iconnor/zoneminder

apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade

MYSQL_ROOT="Password"
echo mysql-server mysql-server/root_password select $MYSQL_ROOT | debconf-set-selections
echo mysql-server mysql-server/root_password_again select $MYSQL_ROOT | debconf-set-selections

apt-get -y install zoneminder

mysql -uroot -p$MYSQL_ROOT < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p$MYSQL_ROOT -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"

chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/

a2enconf zoneminder
a2enmod cgi
a2enmod rewrite

sed -i 's|;date.timezone =|date-timezone = Europe/Berlin|' /etc/php/7.0/apache2/php.ini

systemctl reload apache2

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zoneminder (Ubuntu):
status: New → Confirmed
Revision history for this message
MangoCats (mangocats) wrote :

More subtle, apparently a disconnect between the mysql timezone and the rest of the system timezone is created when using the above proposed solution. ZoneMinder runs, and _most_ things work, but when reviewing event frames, they are stored under GMT timezone instead of the designated timezone, and then cannot be retrieved for playback with log messages like:

Can't open /usr/share/zoneminder/www/events/1/18/08/20/20/55/12/00001-capture.jpg: No such file or directory

.../1/18/20/20/55/... is the GMT time of the event, but the images are stored under .../1/18/20/16/55/... which corresponds to the America/New_York timezone set by the above procedure.

Anybody know the right way to set the mysql timezone to match? I've seen references to using the TZ environment variable, I've got that set to America/New_York, but my mysql still thinks it's on "system" time and that "system" time is GMT.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.