Set the time zone on a per user basis

September 1, 2009

Continuing on my general rant that all computer systems should use UTC/GMT for their system clocks the question is often posed by users that want to see their own local time when they log into a remote computer.

Procedure – set the time zone on a per user basis

Open user ~/.bashrc or ~/.bash_profile file using vi text editor and set up TZ environment variable. Append or SET TZ as follows:

export TZ=”/usr/share/zoneinfo/{TIMEZONE-DIRECTORY}/{TIMEZONE_FILE}>”

If your username is foo and you would like to set TZ to Asia/Calcutta (INDIA IST) type command:

# vi /home/foo/.bashrc

Append following:

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

Save and close the file.

(via http://www.cyberciti.biz/faq/howto-linux-set-time-zone-per-user-basis/)

Make The Call

Get Started

Use this if you’re making an IT decision and want to avoid a costly mistake. Answer four quick questions and we’ll route you to the right next step—strategy, sourcing, contract review, or optimization.

If it’s a fit, you’ll be able to book time immediately.

By continuing, you agree to be contacted about your request. No spam.