Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to convert time zone in MySQL?

You can change the timezone in MySQL using php function CONVERT_TZ.

Following is the SQL command to change the timezone.

SELECT CONVERT_TZ( NOW(),'current-time-zone','changed-time-zone' );

If your current time zone is MST and you want to change the time zone to USA new york, you can fire the below command.

SELECT CONVERT_TZ( NOW(),'US/MST','America/New_York' );

Was this answer helpful?

« Back

chat