Setting time to server time

Hi all,

 I'm trying to get an app that will set the local machine's time to that of the server time. The app should check the server time at certain intervals and change the local time if necessary.

Thanks in advance.

Why not just actually set the machine to use a NTS?

How can you get the server time?

If by server you mean time server, here’s an example that uses apple’s time server:

do shell script "ntpdate" with administrator privileges

This asks for password. If you want the password in the script:

do shell script "ntpdate" password the_password with administrator privileges


What’s NTS?

Network Time Server

Your default time server is the Apple time server.

Which uses the NTP (Network Time Protocol) :slight_smile: