• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

troubles with time

i made an error during LINUX installation: i choosed a wrong time (an hour in advance). How may i put all right now?

date --set='-1 hour' works, but just until the next reboot
  • 2
1 Solution
If you take a look at /etc you'll see that the file /etc/localtime is actually a symbolic link to a time file located (on redhat 6.0) in /usr/share/zoneinfo/...
All you have to do to change your timezone is remove this file and make a new symbolic link to your particular timezone.

If your problem is the actual time, then make sure that your BIOS is correct because linux gets the time from there.
Step 1:
date --set='-1 hour'

Step 2:
/sbin/clock -w

For more detail, type /sbin/clock -XXX
Some distribution may put the 'clock' to somewhere
else, search for /bin/clock,  /usr/bin/clock, /usr/sbin/clock.

Also, make sure you are not running the 'clock' program for windows, which will present you a clock on the screen.

to config to another timezone, login root and type


Oh. This is for Slackware Linux.  I don't know if other distribution has this script.  :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now