0% found this document useful (0 votes)
86 views1 page

Changing The Timezone

This document provides instructions for changing the timezone, date, and time settings in Linux. It explains that the /etc/localtime file links to the timezone file in /usr/share/zoneinfo. It also recommends setting the timezone in the /etc/sysconfig/clock file. It describes using the 'date' command to change the system date and time, and updating the hardware clock in UTC with the 'date' command and the '--utc' option.

Uploaded by

esidkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views1 page

Changing The Timezone

This document provides instructions for changing the timezone, date, and time settings in Linux. It explains that the /etc/localtime file links to the timezone file in /usr/share/zoneinfo. It also recommends setting the timezone in the /etc/sysconfig/clock file. It describes using the 'date' command to change the system date and time, and updating the hardware clock in UTC with the 'date' command and the '--utc' option.

Uploaded by

esidkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Changing the timezone, date, and time

Setting your time zone


In /etc the file, localtime, is a link to or copy of a file containing information about your time
zone. Zone information files are usually in /usr/share/zoneinfo but this depends on your
distribution. So if your localtime file points to a zone info file that is not your time zone you can
change it by browsing the directories in /usr/share/zoneinfo to find your country, then find your
city or a city in the same time zone and link localtime to it.
$ ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Some applications may use the configuration file /etc/sysconfig/clock to determine the current
time zone so it's a good idea to set the ZONE entry (e.g. "America/Los_Angeles").
Changing the date and time
Changing the date and time requires two steps. First, Linux's date and time must be changed and
then the new time has to be written to the hardware clock.
The date command can be used for both viewing and changing the date and time.

To change the time use date followed by the month, day, hour, minute, and year all numeric and
no spaces. So, to set the date and time to November 2nd, 2003 12:57

The hardware clock can be updated in UTC (coordinated universal time) or your local time. It is
standard practice to update it in UTC.

To update it to your local time leave off the --utc or add --localtime and leave off the --utc.

You might also like