Changing system clock using 'date'

I am struggling to write a script that will change the system clock to :07 faster than network time server.

I have an application that will run the script when I need.

Any ideas on how to do this?

Any ideas here?

It’s unclear what you meant.

What do you mean by “faster than network time server?”. When NTP is active you can set the time but it will be changed back to the old time. So you need to disable NTP first.

The title says “using ‘date’”. is that the shell command? As in:

do shell script "date 0308000017" with administrator privileges

Setting the time 7 minutes ahead you’ll need something like this:

set theTime to current date

set theYear to text 3 thru 4 of (year of theTime as string)
set theMonth to text -2 thru -1 of ("00" & (month of theTime as integer))
set theDay to text -2 thru -1 of ("00" & (day of theTime as integer))
set theHour to text -2 thru -1 of ("00" & (hours of theTime as integer))
set theMinute to text -2 thru -1 of ("00" & (((minutes of theTime as integer) + 7) mod 60))

set newDate to theMonth & theDay & theHour & theMinute & theYear

do shell script "date " & newDate with administrator privileges

Thank you for your detailed reply. This is good information, but it is not what I am looking to do.

Let me explain to you the application and then you will see more clearly what the goal is.

We have a radio studio that is feeding the programing out of the Mac. In order to make sure we do not have any improper language on the air, we run everything through a 7 second delay. So, as a result, in order for the feed to be ON TIME, the studio computer must perpetually run 7 seconds fast.

So, I can not run network time server.

What I want to do is create a small Applescript that checks the network time server (gets the current time) and then sets the system clock 7 seconds ahead of the actual time. I would trigger this script to run using my studio software once a day to make sure the clock is always 7 seconds fast.

Hopefully this clears up any misunderstanding.