The osTicket system tries to get the timezone value from mysql database variable 'global.system_time_zone'. It returns the OS timezone value or the timezone value in my.cnf. If user changed the database timezone, the value is incorrect. For example, I have changed the timezone value in my database as UTC and my OS timezone is EST.MariaDB > SELECT @@global.system_time_zone, @@global.time_zone;+---------------------------+--------------------+| @@global.system_time_zone | @@global.time_zone |+---------------------------+--------------------+| EST | UTC |+---------------------------+--------------------+1 row in set (0.00 sec)
The correct way is getting the global.time_zone value first. If the value is "SYSTEM", it means the value same as global.system_time_zone. Otherwise, it should return the global.time_zone value.Please find my fix as below.