how to set for system's timezone with mysql timezone?

1.1k Views Asked by At

When I used for below function,

SELECT timediff( now() , convert_tz( now() , @@session.time_zone ,'+00:00')) ;

it shows -07:00:00

also the NOW() shows datetime different than my system's datetime.

also with SHOW VARIABLES LIKE '%time_zone%' it shows,

Variable_name        Value 
system_time_zone     MST
time_zone            SYSTEM

How can I set for that, so that it does not conflict on insertion of entry in my database regarding date?

1

There are 1 best solutions below

0
On

Here is a good link to what you want:

http://support.modwest.com/content/6/256/en/how-do-i-change-mysql-timezone.html

Hope this helps.