VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: HOWTO make and automate Time changes  (Read 2980 times)

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
HOWTO make and automate Time changes
« on: March 11, 2007, 10:01:12 am »

[This is a rehash (with some additions) of an older HOWTO from the original forum.]

VectorLinux and Slackware do not, by default, automatically change your computer clock at daylight savings time change periods. But it is simple enough to do. Below are some scenarios for dealing with TimeZones, Dates and Time under VL:

1) to change your local timezone manually:

-VASM, SUPER, (root password), HARDWARE, ZONESET

2) to change the time and/or date manually at any time:

-VASM, SUPER, (root password), HARDWARE, DATESET

3) if you live in Canada or the USA and you use VL5.1 or earlier:

-follow the link and make the changes posted by JohnB316 here:
- http://www.vectorlinux.com/forum2/index.php?topic=2219.0
-(this updates your system for the new DST periods in North America)
-you MUST then do Steps 1 and 2 above.

4) to automate time changes and to syncronize your hardware clock daily:

-download "rdate" from linuxpackages.net
-install rdate using "installpkg rdate" in a terminal as root
-ensure you have the crond daemon running by checking "ps aux" and see if it is there. If not, VASM, SUPER, (root password), SERVICE, SRVSET, 4, enable cron
-with any text editor create a file called "time_update.sh". Add these lines and save the file:
   #!/bin/sh
   rdate time.nrc.ca && hwclock --systohc
-make that file executable: #chmod u+x time_update.sh
-copy that file to /etc/cron.daily
-(the time server "time.nrc.ca" should be substituted for the nearest Internet time server to your location. That info is found at: http://www.pool.ntp.org/ ).
-if your computer is not turned on all the time you will need to then install anacron (because cron assumes your computer will do things at very specific times and will not perform its tasks if off at that exact time):
          -install anacron from linuxpackages.net
         - edit /etc/rc.d/rc.local and add "anacron" to the last line in that file.



 
« Last Edit: March 11, 2007, 10:09:41 am by lagagnon »
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll