Add Set time and date automatically config profile (#49468)

This enforces NTP on macOS devices.

The "Set date and time automatically" toggle can be verified with
`systemsetup - getusingnetworktime` (you can write a script to put the
output of that into a file, then use the `file_lines` table in a
policy), and set with `systemsetup - setusingnetworktime on` (which
could be a script automation that kicks off if a device fails the
policy).
If you want to prevent users from changing it, you can use the attached
config profile. Note that it requires setting the NTP server, but this
is most likely just the default Apple server. The `setusingnetworktime`
will work even with the Ul locked.

<img width="1458" height="320" alt="Screenshot 2026-05-14 at 08 19 28"
src="https://github.com/user-attachments/assets/22064715-1548-490c-b3e0-bde51dd26f12"
/>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a macOS configuration profile that automatically configures
devices to use Apple’s time server.
* Included a human-readable profile name and standard configuration
metadata for easier deployment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Steven Palmesano
2026-07-22 15:41:00 -04:00
committed by GitHub
parent a3f6a45fa9
commit 8e44fb59f1
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.apple.MCX</string>
<key>PayloadIdentifier</key>
<string>com.fleetdm.timeserver</string>
<key>PayloadUUID</key>
<string>0E6CD857-2B26-4B38-BF20-61DD08372CF3</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>timeServer</key>
<string>time.apple.com</string>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>Time Server Configuration</string>
<key>PayloadIdentifier</key>
<string>com.fleetdm.timeserver.profile</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>AEE78D8D-2A1E-4BE9-B133-32FE56C5F0E3</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>