InMotion Hosting Support Center

How can I change my MySQL database timezone?

Category: Databases

2012-11-24 12:38 am EST

Hits: 581
I am a bit unsure how to, but I was wondering if the database's timezone was set on the hosting end. Currently, when I submit data with a CURRRENT_TIMESTAMP, the time is 1 hour behind.

Does anyone know how I can change it? Or could possibly point me to the right direction? Thanks.

EDIT: Ah, so I've found the variables tab on my phpMyAdmin page, and there is a date_format that has been preset. Maybe I can somehow edit that to knock the time back to CST?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User


9,968 Points
2012-11-26 11:32 am EST
Hello SeenBean, and thanks for your question.

On a shared server the MySQL time zone is set to the local timezone of that server, in your case EST, and this can't be changed. However you can adjust it on the fly to your needs using a few built in MySQL commands.

How to convert MySQL time

The following command would take the MySQL NOW() command that gives back the current time stamp, and then you can specify two time zones, the first being EST (-05:00) and the second being CST (-06:00) to get your time zone out of the EST time stamps:

SELECT CONVERT_TZ(NOW(),'-05:00','-06:00');

You can also use the DATE_ADD and DATE_SUB commands to add or subtract hours for the current time stamp on the server as well:



For further reading you can also check out the MySQL documentation on date and time functions below:

MySQL date and time functions

Please let us know if you have any other questions at all.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!