Skip to main content

Database time not matching server time

Comments

4 comments

  • kernow
    You can add an entry to your /etc/my.cnf file. Example, say your -6 hours GMT/UTC add this to your my.cnf
    default-time-zone = '-06:00'
    You will need to restart MySQL after making the change. Confirm with this command:
    mysql -e "SELECT NOW();"
    which will show something like:
    +---------------------+ | NOW() | +---------------------+ | 2017-03-16 20:57:31 | +---------------------+
    0
  • Todd23
    I recently updated EA 3 to EA 4 in whm the server time is set to eastern. the database time however is still set to utc time How can this be fixed?

    That may work, however when the fall comes and the time changes that -6 becomes -7 and then things are out of sync again.
    0
  • Todd23
    You can add an entry to your /etc/my.cnf file. Example, say your -6 hours GMT/UTC add this to your my.cnf
    default-time-zone = '-06:00'
    You will need to restart MySQL after making the change. Confirm with this command:
    mysql -e "SELECT NOW();"
    which will show something like:
    +---------------------+ | NOW() | +---------------------+ | 2017-03-16 20:57:31 | +---------------------+

    Thanks for the suggestion. without making any more changes I restarted mysql a couple time and it fixed itself.
    0
  • cPanelMichael
    Hello, I'm happy to see the issue is now fixed. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.