hikan
09-14-2004, 04:45 PM
I know this is a dumb question, but how do you set the time in Linux? I tried using date, hwclock, and adjusting it manually in the BIOS, but my system always seems to have the wrong date and time. Any advice?
|
Click to See Complete Forum and Search --> : What the Clock? hikan 09-14-2004, 04:45 PM I know this is a dumb question, but how do you set the time in Linux? I tried using date, hwclock, and adjusting it manually in the BIOS, but my system always seems to have the wrong date and time. Any advice? fatTrav 09-14-2004, 04:58 PM To set the timeszone ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime I use this to set the actual time: ntpdate -b ntp-2.uiuc.edu I have that set as an hourly cron job. This queries the time server at ntp-2.uiuc.edu and sets my system's time to it. Be sure to change America/Chicago to whatever timezone you use. Also, change the ntp server to something closer if you live far away from the University of Illinois :D KenP 09-14-2004, 06:05 PM Check out this article yesterday for setting time using NTP http://enterprise.linux.com/enterprise/04/09/10/1449232.shtml?tid=89 Hope it might help fatTrav 09-14-2004, 07:02 PM ntpd is a good solution for setting your time ... but using ntpdate is *much* easier for this slacker :D hikan 09-14-2004, 07:44 PM Thanks guys, it's all fixed up. Both the script worked, and the guide you referenced. So now my clock is happily displaying the proper time, and all is well. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |