1
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
1
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
5
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.
3
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.
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... – andrekeller – 2012-11-21T00:48:49.693
Yes, i am agree with you, for /usr on a separate partition it's preferably to use a copy. – arutemus – 2012-11-21T16:18:16.183
0
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.
1I think you probably want superuser. – EdC – 2012-11-18T05:03:52.577
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 – 2013-01-23T19:26:37.990