I have tried using this command but it seems to require the time service on the server.

This is why I originally used
shell("net time server /set")

it's a command which set the time required with no extra services running on the server.