View Single Post
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#1
I have re-packaged the Debian version of the 'rdate' program for OS2007. You can use it to set the clock on the N800 from a reference time server computer, using either the RFC868 time protocol or SNTP.

It works similar to e.g 'ntpdate', although they don't always work against the same computers.

Code:
>rdate
Usage: rdate [-46acnpsv] [-o port] host
  -4: use IPv4 only
  -6: use IPv6 only
  -a: use adjtime instead of instant change
  -c: correct leap second count
  -n: use SNTP instead of RFC868 time protocol
  -o num: override time port with num
  -p: just print, don't set
  -s: just set, don't print
  -u: use UDP instead of TCP as transport
  -v: verbose output
To just check your clock against a server, use -p -v:
>rdate -p -v -n time.nist.gov
Tue Oct 30 17:59:39 MET 2007
rdate: adjust local clock by 2.046977 seconds

>rdate -p -v time-b.timefreq.bldrdoc.gov
Tue Oct 30 18:00:56 MET 2007
rdate: adjust local clock by 2 seconds

The above "-p print only" commands can be run as user. To set the clock (i.e. running without -p or with -s) you need to be root.

Note that time.nist.gov appears to support only SNTP (thus the -n), while the other one supports RFC868. (If you look at nist's website you should find a whole bunch of other reference time servers).

Very often you can also get rdate working against a local computer in your network if that one's got correct time by other means. Particularly if that computer happens to be a Unix- or Linux computer:
>rdate local-computer.your.net

The above example output was from my desktop computer. When I did the same on the N800 it was only 3 seconds off.. and I haven't adjusted the time in weeks, possibly months (I set it manually, but accurately at the time). So the N800 clock seems to be _very_ accurate, unless I got lucky for some reason. But this means that you won't have to constantly monitor and set the N800 clock, which means that it's not a problem that there's no 'cron' on the N800, and it also means that there's not much point in installing the whole 'ntp' suite, for example.

Where to find it:
http://www.box.net/shared/zaj5id7dau
(click the link and you'll see the .deb, together with some other stuff.)
Note that box.net's server doesn't set the necessary Content-Type, so if you use the N800 browser it won't automatically understand that it can be installed. You'll have to download it first.
But, as this program is _really tiny_ I'll attach it here as well: The .deb is 9KB while the installed program is only 16KB.

TA-T3
Attached Files
File Type: deb rdate_1.1.2-5_armel.deb (9.2 KB, 464 views)
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following 4 Users Say Thank You to TA-t3 For This Useful Post: