MySql

Set timezone of Mysql Server

Many times timezone issues with your database server causes wrong information to be entered in reports, transaction tables etc.

To fix timezone issues with your mysql server, just login to your mysql and execute following query:

SET GLOBAL time_zone = ‘<REQUIRED TIMZONE>;

E.g. SET GLOBAL time_zone = ‘+5:30’;

If you have to get the  current timezone, use this- SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);

You Might Also Like