I am going to post this little tip here because I know next time I need to fix Time Conditions… this is probably one of the places I will look.
Problem: Your dumb @$$ hosting provider decides, without your permission or notification, to go around and “fix” all the hardware clocks on all the DEDICATED SERVERS so the clock is “correct”.
The problem is your PBX serves customers in places where the clock only changes by 30 minutes or doesn’t change at all.
So you come in the morning after thinking “I did not update my servers so everything should be fine” morning and your “customers” (internal staff) are all angry because their Time Conditions have decided to tell customers your office is closed for as much as a full hour after everyone has shown up for work costing you thousands of dollars in revenue.
1 - ln -sf /usr/share/zoneinfo/Country/City /etc/localtime
2 - /sbin/hwclock --systohc
3 - /etc/init.d/asterisk restart (important - seems that asterisk doesn’t notice the time change unless you restart the service)
4 - tail /var/log/asterisk/full <-- confirm the clock is right in the logs
I hope this helps the next guy who is ripping out his hair because 1) his logs are all off by some number of hours 2) all his time conditions are wrong 3) voicemails are wrong