The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

world timestamp is not matching for mysql

Discussion in 'General Discussion' started by durangod, Oct 26, 2014.

  1. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    There is a 10m54 sec offset to my timestamp and its causing havoc with one of my site databases which monitors the difference.

    from ssh root when i use now it gives me the following

    Code:
    root@vulcan [/etc]# mysql -e "SELECT NOW();"
    +---------------------+
    | NOW()               |
    +---------------------+
    | 2014-10-26 13:38:08 |
    +---------------------+
    
    but the actual time is 13:48 on my pic and via Unix TimeStamp - Epoch Generator & Converter
    is 7:48 pm

    i set the server time in WHM and also synced it but still same issue.

    How do i make up (add that 10 min) to my system time?

    i normally use denver time so that is -6 i believe.
     
  2. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    update: one thing i tried is via ssh i edited my.cnf like so

    Code:
    default-time-zone = '-05:50'
    
    which since i normally do -06:00 via whm this now gives me the correct time when i do NOW

    however this still does not fix the issue because it still does not change mysql default timestamp.

    I also via whm synced it with the server but still no difference.

    so what now?
     
    #2 durangod, Oct 26, 2014
    Last edited: Oct 26, 2014
  3. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    update it seems the NOW is not what i needed to change i need to change this

    Code:
     mysql -e "SELECT UTC_TIMESTAMP();"
    +---------------------+
    | UTC_TIMESTAMP()     |
    +---------------------+
    | 2014-10-26 23:11:34 |
    +---------------------+
    
    i need to add 10 min to that
     
  4. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    so i have the command now i just need to firgure out where to put it..


    Code:
    so i have the command now i just need to figure out where to put it
    
    mysql -e "SELECT CONVERT_TZ(UTC_TIMESTAMP(), @@session.time_zone, '+00:20');"
     +------------------------------------------------------------+
     | CONVERT_TZ(UTC_TIMESTAMP(), @@session.time_zone, '+00:20') |
     +------------------------------------------------------------+
     | 2014-10-27 06:03:57 |
     +------------------------------------------------------------+
    
    which is correct now or i could do @@global i guess
    
    
    
    
     
  5. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    so tell me why my server time is off please?
     
  6. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    here is the error im getting from the third party script. We have determined that the issue is on the server side as the procon side has the correct UTC timestamp.

    it has to be less than 5 min diff i believe.
     
  7. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    i guess maybe i should open a ticket on this to find out whats up with my UTC on the server
     
  8. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    ticket 5626203 done
     
  9. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
  10. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    important!!! some things have changed since those instructions. it works good until you get to the pool server you can no longer use the pool.ntp.org server you will get a not permitted message in putty.

    i guess they are trying to keep it clean and healthy and faster so it says near the botton of this page about this. These are some of the changes. Here are two links..

    pool.ntp.org: the internet cluster of ntp servers

    and here is the link they offer of a list of servers to use

    WebHome < Servers < NTP

    hope that helps

    of course nothing goes as planned in this business does it now..

    so now what lol
     
    #10 durangod, Oct 27, 2014
    Last edited: Oct 27, 2014
  11. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    as it turns out this is something my server host has to do as i am on virtuoso
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see you were able to determine the best course of action. Feel free to update us with the outcome.

    Thank you.
     
Loading...
Similar Threads - world timestamp matching
  1. Osama Tariq
    Replies:
    6
    Views:
    156

Share This Page