If you are using Dedicated server or Virtual private server, files or directories access,modify,changes,logs reports time based on
your timezone settings. First know your current system time command is "date".
Current Date :
# date
Wed Feb 26 02:26:19 IST 2015
Timezone series files are located at /usr/share/zoneinfo, choose appropriate timezone location as you like,
Change TimeZone :
Do you want to chnage timezone setting you have root access permission steps are,
Option 1:
Remove the localtime under /etc/ directory and give softlinks,
The below commands will set timezone to Asia/Calcutta.
# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
# ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
Option 2:
Another method is,
# export TZ=Asia/Calcutta
# date
# date
Now, ensure your timezone format configured correct time,
# cd /usr/share/zoneinfo
# find * -type f -exec sh -c "diff -q /etc/localtime '{}' > /dev/null && echo {}" \;
# find * -type f -exec sh -c "diff -q /etc/localtime '{}' > /dev/null && echo {}" \;
Asia/Calcutta
Asia/Kolkata
posix/Asia/Calcutta
posix/Asia/Kolkata
To show numeric timezone format,
# date +'%:z %Z'
+05:30 IST
Comments (0)