Server time sync problems

Discussion in 'Tips/Tricks/Mods' started by CSsab, Aug 1, 2011.

  1. CSsab

    CSsab New Member

    My setup is a Ubuntu Master with various Debian nodes in a multiserver setup.

    I have recently experienced quite a few problems with servers being way out there with regard to timezone. In one node, mysql time was 12 hours behind when I checked the time(); function. The system time was 2 hours in front of the master's system time. What a mess that has absolutely nothing to do with ISPConfig 3 performance. This results in the following problems (that I have noticed so far)
    1. Welcome email is not sent to the new email account for hours .. and hours...
    2. Logs are not updated efficiently in the dashboard.
    3. Zone transfers are out of whack
    4. There is a general sense of lagging in a new system which should be running well.

    I have things running smoothly now and am posting what I did in case it might help a few people who are experiencing similar problems.

    1. Edit /etc/default/rcS and select "no" for UTC:

    vi /etc/default/rcS


    If this line doesn't exist .. put it in there.

    2. Set the correct timezone in php5 files. On the master there will be the following files to edit (line 949 on my setup)


    On a nameserver node only


    will be present, of course.

    So for example:

    vi /etc/php5/cli/php.ini
    <---- this brings you to line 949
    ;date.timezone =

    Uncomment the line and put in your correct timezone - you will see that the list of timezones are available from


    date.timezone = SomeCountry/SomeCity

    3. Restart apache2 and mysql

    Now check mysql database time like this:

    mysql -u root -p

    select now()


    And correct time should be displayed.

    Hope this helps a few people.

Share This Page