[Solved] Making a terminal executable file that changes the date on your Mac [closed]


You can change the date of the mac using the following command from the terminal.

date -u {month}{day}{hour}{minute}{year}

Replaced bracket with a two digit number. To set, October 16th 2020 21:16 would become the following command:

date 1016211620

Or you can create apple script to do it:

set ntpdPID to do shell script "systemsetup -getusingnetworktime; exit 0" with administrator privileges
if ntpdPID is "Network Time: On" then
    do shell script "systemsetup -setusingnetworktime off" with administrator privileges
    do shell script "systemsetup -setdate '01:24:1984' -settime '03:00:00'" with administrator privileges
else
    do shell script "systemsetup -setusingnetworktime on" with administrator privileges
end if

To create an apple script, see this reference

2

solved Making a terminal executable file that changes the date on your Mac [closed]