Setting timezone in Linux

Timezone is the basis of time calculation based on latitudes and longitudes. In Linux system, timezone configuration is saved in /etc/localtime . You can use
 more /etc/localtime
to see your timezone settings.  You can change this timezone to your timezone or some different timezones. Mainly there are 24 timezones. But you can see a whole list of timezones by the following command in your Linux system.
ls /usr/share/zoneinfo/
 Now to set your timezone, use the following commands:
rm /etc/localtime
ln -sf /usr/share/zoneinfo/your_time_zone /etc/localtime

You can use date command to check and verify that change in timezone worked.
For example If you want to change your localtime zone to Dominic Republic's time then you would do:
rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Santo_Domingo

Similarly for Kathmandu, you would use,
ln -sf /usr/share/zoneinfo/Asia/Kathmandu 

Comments

Popular posts from this blog

Automate file upload in Selenium IDE

How To Install and Configure Nextcloud