Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Linux system has time format of UTC-5:0. How can i change it to UTC+5:30? Using date command i can able to change the time, but not the format

share|improve this question

migrated from stackoverflow.com Nov 18 '12 at 12:21

This question came from our site for professional and enthusiast programmers.

1  
I think you probably want superuser. –  EdC Nov 18 '12 at 5:03
    
That isn't "time format", that is your timezone. And you can set the timezone used via the TZ environment variable (no root required, affects just you). –  vonbrand Jan 23 '13 at 19:26
add comment

3 Answers 3

up vote 5 down vote accepted
cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

or

cp /usr/share/zoneinfo/Asia/Colombo /etc/localtime

Some distribution provide utilities for that like dpkg-reconfigure tzdata, tzselect, etc.

share|improve this answer
add comment

It's better to use

ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

Because if you use cp and there is some change in the tzdata package you will need to make cp again.

share|improve this answer
    
Actually almost all linux distributions nowadays use a copy instead of a symlink. The main reason is, that you have the right timestamps also of early actions that happen before /usr is mounted. This might change again in the future when /usr wont be on a separate partition because udev/systemd/etc. wont support it anymore... –  rbtux Nov 21 '12 at 0:48
    
Yes, i am agree with you, for /usr on a separate partition it's preferably to use a copy. –  arutemus Nov 21 '12 at 16:18
add comment

This will help you to change the data time format to UTC+5:30 cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime or create a softlink.

share|improve this answer
add comment

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.