how to set correct date and time on my linux box

how to set correct date and time on my linux box

Post by Jens Meye » Mon, 16 Oct 2000 04:00:00



i would like to set the correct time on my linux box when the connection to
the internet via dial on demand is established (using /etc/ip-up)

i read about the netdate tool and would like to know which timeservers I
could use and which experiences you made

thanks

 
 
 

how to set correct date and time on my linux box

Post by David Efflan » Mon, 16 Oct 2000 04:00:00



>i would like to set the correct time on my linux box when the connection to
>the internet via dial on demand is established (using /etc/ip-up)

>i read about the netdate tool and would like to know which timeservers I
>could use and which experiences you made

You want ntpdate which can update your system clock from time servers.  
If you installed xntp then there should be docs on your system that link
to the list of time servers.  You should use stratum 2 servers.  Pick some
close to home (mine would be too far away).

If you do put it in a ppp script (or /etc/ppp/ip-up.local) you probably
want to do something like this:

sleep 1
/usr/sbin/ntpdate -bs some.time.server
/usr/sbin/setclock

However, non-RedHat distros may have hdwclock or something else to set the
CMOS clock.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

how to set correct date and time on my linux box

Post by Michael V. Ferrant » Tue, 17 Oct 2000 04:00:00


Here I was, minding my own business, and wouldn't you know it?

Quote:>i would like to set the correct time on my linux box when the connection to
>the internet via dial on demand is established (using /etc/ip-up)

From a previous post by Alok Krishen:

Quote:>Thanks everyone for helping.  For the benefit of others here is how I was
>able to get time from a government server and set my computer clock.  I am
>using Mandrake-Linux 6.0.  The procedure should work on other unix/linux
>systems with rdate command.

>Sign on as root
>Add the following to the /etc/hosts
>    132.163.135.130   nist
>Run rdate as follows:
>    rdate -p -s nist

>or if you do not want to mess with changing the /etc/hosts, you can just run:
>    rdate -p -s 132.163.135.130

>Of course, you can find other time server internet addresses and use then
>instead of the internet address for NIST.  See man rdate for details.

        Guess you could easily add the extra command to the ip-up script.

--               Michael V. Ferranti [blades&inreach*com]
Warning: The Surgeon General has deemed that excessive displays of warning
labels and public service announcements produce stress and shortens lives.

 
 
 

1. set the correct time on my linux box

i would like to set the correct time on my linux box when the connection to
the internet via dial on demand is established (using /etc/ip-up)

i read about the netdate tool and would like to know which timeservers I
could use and which experiences you made

thanks

2. Somethin about char ARRAY

3. Crontab that sets correct date/time automatically (RedHat)

4. co-existing with Windows 95

5. Linux and correct date/time command

6. ACM Mini Seminar: Autotools

7. date/time of a file compare with current date/time

8. linkage with xlC

9. Kernel time - 'date' not correct

10. run time date and syslog date/time conflict

11. IPC not keeping correct time or date.

12. UW213 - mailsurr - setting correct date based on TZ on outgoing mails

13. Setting date correct