Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

how to display the current time configuration like time zone in ubuntu?

in centos it is "cat /etc/sysconfig/clock"

share|improve this question
What does the CentOS output for cat /etc/sysconfig/clock look like ? – belacqua Feb 22 '11 at 17:25
like this [root@SUPA9611 ~]# cat /etc/sysconfig/clock ZONE="Europe/Amsterdam" UTC=true ARC=false – usef_ksa Feb 22 '11 at 18:24

3 Answers

up vote 6 down vote accepted

I don't know of a single file, but this may give you the info needed:

cat /etc/timezone
grep UTC /etc/default/rcS
date
# hardware clock
sudo hwclock --show
share|improve this answer
thanks man.. it works – usef_ksa Feb 22 '11 at 18:55

Check out info date, and for example date +'%z'

share|improve this answer
did not work! the output is like man date – usef_ksa Feb 22 '11 at 18:25

If you need a formatted Area ans Zone you can use:

$ grep `date +%Z` /etc/timezone 
  Etc/UTC
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.