MySQL CONVERT_TZ function is one of the Date methods, which converts the given DateTime from One time zone to another. Let us see how to use this to change the timezones of a date expression with an example.
The basic syntax of the CONVERT_TZ() Function in MySQL is
CONVERT_TZ(Date, from_timezone, to_timezone);
MySQL CONVERT_TZ function Example
In this MySQL example, we used three method statements to convert the given date into different timezones.
SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '+05:50');
SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '-05:50');
SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '+10:30');
