LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Changing the time in Slack? (http://www.linuxquestions.org/questions/slackware-14/changing-the-time-in-slack-80046/)

pyschomike15 08-07-2003 11:43 PM

Changing the time in Slack?
 
I must have accidently set a wrong setting in the config of Slack. But somehow my time got knocked about 4 hours off. There is no option to change the time but i know there is some way. How do I change the time of the clock.

Mike

slakmagik 08-08-2003 12:37 AM

That happened to me, too, somehow. It's actually the 'date' command but when I tried to fix it I ended up in 1977 - couldn't get the syntax right for some reason - so I just reset it from the BIOS. :rolleyes:

-- Oh, and during setup you're given the option of 'universal time coordinate' or 'local' and you'll probably want local. I think installing Mandrake screwed mine up, but I'm not sure how, as it's local and I always say local whenever the issue comes up.

Noryungi 08-08-2003 04:37 AM

Always remember: "apropos", "whatis" and "man" are your friends!

Use "date" (probably as root) to change the date and the time on a Slackware Linux system.

I am not in front of my Slackware machine right now, but here is a link to the man page of a Red Hat system (should be the same on Slackware):
http://www.freebsd.org/cgi/man.cgi?q...nux%2fi386+7.3

Hope this helps! :D

Kjetil4455 08-08-2003 08:30 AM

just do it from X? easyer ;)

Locura 08-08-2003 09:02 AM

From the man page...

date [OPTION] [MMDDhhmm[[CC]YY][.ss]]

This has to be run as root. you have to specify at least the month, day, hour, and minute, so to set the time to 4:00 PM on August 7th, you would run the command date 08071600.

If you need to change the year you can add the year onto the end of the number, and if you want to set it down to the second, you use a period, then the number of seconds, at the very end of the number. So, to set it to 4:00:23 PM on August 7th, you would use date 08071600.23. And in the case of it having been set back to 1977 like digiot mentioned, you would just use the command date 080716002003.23 to set it to the appropriate year.

pyschomike15 08-08-2003 11:38 AM

Hey thanks for the info. I got it changed right away. Also I did try using man and whereis but not for date i used the word clock because that what the clock program is called. It turned out to be some program to measure your cpu. Thanks again.

Mike

Cerbere 08-09-2003 01:03 AM

Check this link and it'll never happen again:

http://members.cox.net/laitcg/new/time.html

There are a lot of other great Slack tips there, too.

Enjoy!
--- Cerbere

Astro 08-10-2003 09:38 AM

I like setting my time based on the command 'ntpdate time.nist.gov' ... That usually works fine for me. :-)

root@trance:/home/astro# ntpdate time.nist.gov
10 Aug 10:37:59 ntpdate[17140]: step time server 192.43.244.18 offset -23.311424 sec


All times are GMT -5. The time now is 10:23 AM.