set time zone for a user in linux server

From WebHostingNeeds.com
Jump to: navigation, search

I run an application on my server, i need the time to IST. But server runs some forum, so i need server time in GMT.

So i created a user and set time zone for the user.

vi /home/username/.bashrc

Add

export TZ="/usr/share/zoneinfo/Asia/Calcutta"

Update time from ntp server

ntpdate -s 0.centos.pool.ntp.org