MariaDB/Mysql Timezone

By default, mysql timezone value is system. It causes Python application error. After changed timezone to UTC, problem is solved.

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

Change my.cnf

[mysqld] 

default_time_zone=UTC

Restart Mysql

source:

https://mariadb.com/kb/en/mariadb/mysql_tzinfo_to_sql/

https://mariadb.com/kb/en/mariadb/time-zones/

Written on March 13, 2017