Check the current timezone from MySQL:
SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
OR
select now();
To check where the timezone is loaded from use:
SELECT @@session.time_zone;
SELECT @@global.time_zone;
If it is set to SYSTEM then it is using either timezone defined inside the my.cnf file or from the OS.
Check my.cnf:
grep time /etc/my.cnf
Check OS timezone:
date
You can set a different timezone on the OS and it will apply to mysqld after service restart, or to use different timezones for OS and for MySQL, set:
SET GLOBAL time_zone = '+8:00';
SET GLOBAL time_zone = 'Europe/Helsinki';
SET @@global.time_zone = '+00:00';
SET @@session.time_zone = "+00:00";
*Replace +8:00 and Europe/Helsinki with your timezone.
to make the changes permanent:
nano /etc/my.cnf
and under [mysqld] section add:
default-time-zone = "+00:00"
save the file and restart mysqld service.