How to convert time zone in MySQL? הדפסה

  • 0

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' );

?האם התשובה שקיבלתם הייתה מועילה

« חזרה
Sign up for a newsletter

chat