internet time sync

Can someone help me to write a small applescript that will configure the internet time sync on os8, os9, and osx to get the time from a specific server and update that time every two hours? Thanks!!

Get yourself a copy of Vremya, a free scriptable internet time application, and Akua Sweets, a free scripting addition. After installing both, save this script as a stay-open applet. It will activate itself every two hours as long as it’s running. To make sure it’s running whenever you have your machine turned on, put it in the Startup Items folder. It probably won’t set the time at startup because there won’t be an internet session, but it’ll come back in two hours and do so if a session is established. Alternately, you could start it manually after an internet session is started.

This won’t run under OS X because scripting additions haven’t been updated for that OS. Vremya will still provide you with the seconds offset between the system clock and the time server, but I don’t know how you’d use that in OS X to adjust the clock. There’s probably a way to do it in Unix utilities, but I staunchly refuse to learn Unix in order to use my Mac.

on idle 
tell application "Vremya" 
set theDelta to sync "time.apple.com" 
quit 
end tell 
adjust the clock to (current date) delta theDelta 
return (2 * hours) 
end idle

On a whim, having been reminded of it by this thread, I altered my log-on script to use Vremya instead of NetChrono. Why on earth I ever abandoned Vremya I cannot think - it’s far, far smaller, much quicker, needs no panel to appear and so can be totally transparent, and it’s SCRIPTABLE: tell it to “sync” and “quit” - and the job’s done ‘behind the scenes’ in two seconds.
Apologies for any confusion or time-wasting (sic!) caused. Sorry Jeremy K!
Andreas

Marc - why the need for “adjust the clock”? Surely that’s exactly what “tell Vremya to sync” has already done. After using

ell application "Vremya" 
sync 
quit 

(and provided an adjustment was needed, of course) my ‘AutoClock’ log tells me that an adjustment was in fact made. I haven’t the patience to try it for an extended period in an idle handler but I can’t see that that should make any difference.
Unless I have misunderstood something Mike would not then need Akua.
Andreas

You’re right! I looked at Vremya’s dictionary and it said that it returned a delta value on the time. It didn’t say anything about actually doing the adjustment. That’s what I get for following instructions!