Changing the timezone, date, and time in Fedora Linux
Changing the timezone, date, and time in Fedora Linux
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 |
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.
=>root@PiTT www # date
=>Mon Nov 3 02:25:31 PST 2003
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
=>root@PiTT www # date 110212572003
=>Sun Nov 2 12:57:00 PST 2003
The hardware clock can be updated in UTC (coordinated universal time) or your local time. It is standard practice to update it in UTC.
=>root@PiTT www # hwclock –utc --systohc
To update it to your local time leave off the --utc or add --localtime and leave off the --utc.
=>root@PiTT www # hwclock --systohc

Leave a Comment