Change Server Time to UTC

When we have situation as this, the hosting company is in USA; the data center is in timezone X; the customer is in country Y; and their users are in country Z.
What timezone should you use for your server?  Perhaps you should try Universal Co-ordinated Time (UTC).
To configure that time zone, we can use this command line,

echo "UTC=true" >> /etc/sysconfig/clock

And then change the localtime file as,

mv /etc/localtime /etc/localtime.org
ln -sf /usr/share/zoneinfo/UTC /etc/localtime

After that, make sure that we sync the time to hardware time as,

/sbin/hwclock --systohc
Muhammad Efendi
I am the person who has the passion in programming, hands on, scripting, deployment, monitoring on Openstack, Cloud Foundry, and Cloud Technology. Using Perl, Bash Scripting and Python to pull out and push in the data through API or SDK. Develop the smartphone application is also other passion.

Leave a Reply

Your email address will not be published. Required fields are marked *