Via SSH I print the current date of my server, which is correct based on my location:


When I run SHOW GLOBAL VARIABLES on MySQL, I have time_zone = SYSTEM - which makes me think MySQL will be using the system date and time.

However, when I run SELECT CURRENT_TIME it returns to me a result that looks like it's in another time zone (ignore the diff in minutes due to the time I took between both snapshots):


Is there any other necessary configuration to make CURRENT_TIME in MySQL reflect exactly the same system date time?

  • Run these statements please: SELECT NOW(); and SHOW VARIABLES LIKE 'time_zone' to see you session's variable value. – Jehad Keriaki Feb 15 '18 at 20:47
  • @JehadKeriaki, SELECT NOW(); returned the time four hours less than the System hour and SHOW VARIABLES LIKE 'time_zone' returned SYSTEM – Adriano Castro Feb 16 '18 at 10:14
  • `SHOW VARIABLES LIKE '%zone%'; – Rick James Feb 20 '18 at 3:01
  • @RickJames, thanks, man! system_time_zone shows CST while it should be GMT-3 (my timezone). Now it's a matter of how to change it. – Adriano Castro Feb 20 '18 at 19:31
  • @AdrianoCastro - That's an Operating System question. – Rick James Feb 20 '18 at 21:41

Solved, not through MySQL, but in my WHM > Server Configuration > Server Time, then clicked on Sync Time with Time Server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.