Syntax
CONVERT_TZ(dt,from_tz,to_tz)
Purpose
Converts the datetime value dt from the time zone from_tz to the time zone to_tz and returns the result. If the dt parameter is invalid, NULL is returned.
If the value exceeds the supported range of the TIMESTAMP type when converted from from_tz to UTC, the conversion does not occur. For more information about the supported range of the TIMESTAMP type, see DATE, DATETIME, and TIMESTAMP types.
Examples
obclient> SELECT CONVERT_TZ('2014-01-01 12:00:00','+00:00','+8:00');
+----------------------------------------------------+
| CONVERT_TZ('2014-01-01 12:00:00','+00:00','+8:00') |
+----------------------------------------------------+
| 2014-01-01 20:00:00 |
+----------------------------------------------------+
1 row in set
