This article describes how to convert the time zone in MySQL by using the CONVERT_TZ function.
By default, A2 Hosting's servers use one of the following time zones:
On shared servers, you cannot change the default MySQL time zone, because this would affect other accounts on the server. However, you can convert the time zone used in DATE, TIME, and DATETIME fields by calling the CONVERT_TZ function as needed.
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' );
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.