Knowledge Base

How to convert the time zone in MySQL

This article describes how to convert the time zone in MySQL by using the CONVERT_TZ function.

Using the CONVERT_TZ function

By default, Webhost.Berlin's servers are set to use the US Eastern Standard Time zone. However, you can convert the time zone used in DATE, TIME, and DATETIME fields by calling the CONVERT_TZ function.

For example, the following sample query shows how to convert the current date and time in the US Eastern time zone to the time zone for Paris, France:

SELECT CONVERT_TZ( NOW(),'US/Eastern','Europe/Paris' );

More Information