Overview
The Apple Date & Time Policy sets the time server and time zone on managed Macs, and can make sure the date and time are always set automatically.
Accurate time matters more than it looks:
The Swif agent depends on it. When a Mac's clock is far out of sync, the agent can get stuck, because its sync operations need the correct time. Once this policy sets the time server and time zone, the Mac corrects its clock, and the agent resumes syncing without manual help.
Sign-ins and secure connections depend on it. Certificates, single sign-on, and Kerberos can fail when a clock drifts too far.
Security baselines require it. The CIS macOS Benchmark (recommendation 2.3.2.1) requires Macs to set their time automatically.
Important: Removing the policy doesn't undo its changes. If you remove or unassign the policy, the Mac keeps the time server and time zone the policy set. To change them back, assign a policy with the values you want, or change them on the Mac.
Supported platforms and requirements
Item | Details |
Platform | macOS |
Minimum OS | macOS 10.12.4 (Force Automatic Date and Time needs macOS 10.15) |
Device ownership | Company-owned devices |
Supervision | Not required |
User Enrollment (BYOD) | Not supported |
Settings reference
Setting | What it does | Default | Minimum OS |
Time Server | The time server the Mac syncs its clock with, such as | Not set | macOS 10.12.4 |
Time Zone | The Mac's time zone, as a name from the time zone database, such as | Not set | macOS 10.12.4 |
Force Automatic Date and Time | When on, keeps Set time and date automatically turned on, so the Mac stays in sync with the time server. When off or not set, users choose. | Not set | macOS 10.15 |
Not set means Swif doesn't change that setting, and the Mac keeps its current value.
Time server
Use one server. macOS 10.13 and later support only one time server.
Choose a reliable server.
time.apple.comworks for most organizations. If your network blocks outside time servers, use your internal NTP server.Make sure Macs can reach it. Time servers use NTP on UDP port 123. If a firewall blocks that port, the Mac can't sync.
Time zone
Enter the time zone exactly as it appears in the time zone database, using the Region/City format. For example:
Location | Time Zone value |
New York |
|
San Francisco |
|
London |
|
Singapore |
|
UTC |
|
To see every valid name, run this in Terminal on a Mac:
sudo systemsetup -listtimezones
Setting a time zone fixes it on every assigned Mac. The policy's time zone overrides Set time zone automatically using your current location. When the policy applies, macOS:
turns off Set time zone automatically using your current location
shows This setting has been configured by a profile. under it
sets the policy's time zone, and grays out the time zone city so users can't change it
So a laptop with a fixed time zone keeps that zone wherever it goes. For users who travel, or teams in several time zones, leave Time Zone empty. Or assign different policies to device groups by location.
Force Automatic Date and Time
Turn this on to keep Macs syncing with the time server. This meets CIS macOS Benchmark recommendation 2.3.2.1.
Swif applies it as a managed preference in the profile, the same method the macOS Security Compliance Project uses for CIS 2.3.2.1. It sets TMAutomaticTimeOnlyEnabled to true in com.apple.timed.
Users can't turn it off. The Set time and date automatically switch isn't grayed out, but if a user turns it off, it turns back on right away.
Before you start
Choose a time server that all assigned Macs can reach.
Decide whether to set a time zone. Set one only for Macs that stay in one location, such as office desktops or lab Macs.
Group your Macs by location if you set different time zones.
Create the policy
In Swif, go to Device Management > Policies, then select Create new policy > Configure a Policy.
Select Apple Date & Time Policy.
Enter a clear name, such as
Mac Date & Time – Standard.Enter a Time Server.
Enter a Time Zone, or leave it empty.
Turn on Force Automatic Date and Time.
Save the policy.
Assign it to a device group of Macs.
Example configurations
Example 1: All company Macs (CIS baseline)
Setting | Value |
Time Server |
|
Time Zone | Empty |
Force Automatic Date and Time | On |
Every Mac syncs with Apple's time server, and users keep choosing their own time zone.
Example 2: Office desktops in one location
Setting | Value |
Time Server |
|
Time Zone |
|
Force Automatic Date and Time | On |
Desktops sync with your internal time server and use Pacific time.
Example 3: Servers and build Macs on UTC
Setting | Value |
Time Server |
|
Time Zone |
|
Force Automatic Date and Time | On |
Logs from these Macs use UTC, so they line up with other systems.
Verify the policy
On the Mac:
Open System Settings > General > Device Management and open the Swif profile. Confirm that it includes the date and time settings.
Open System Settings > General > Date & Time and check:
Time Server matches the policy.
If Time Zone is set, Set time zone automatically using your current location is off, shows This setting has been configured by a profile., and the time zone city is grayed out.
If Force Automatic Date and Time is on, turn off Set time and date automatically. It should turn back on right away.
Or check in Terminal:
sudo systemsetup -getnetworktimeserver
sudo systemsetup -getusingnetworktime
sudo systemsetup -gettimezone
defaults read "/Library/Managed Preferences/com.apple.timed" TMAutomaticTimeOnlyEnabled-getusingnetworktimeshould returnNetwork Time: On. If Force Automatic Date and Time is on, the last command should return1.
In Swif, open the device and confirm that the policy shows as applied.
Troubleshooting
The Mac's clock is still wrong
Check that Set time and date automatically is on.
Check that the Mac can reach the time server on UDP port 123.
Try another time server, such as
time.apple.com.
The Swif agent still isn't syncing after the policy applies
Check that the Mac's clock now shows the correct time.
Restart the Swif agent, or wait for its next scheduled check-in.
The time zone didn't change
Check that the value matches a name from
sudo systemsetup -listtimezonesexactly, including capitalization and underscores.Check that the policy shows as applied on the device.
"Set time and date automatically" turns back on by itself
This is expected when Force Automatic Date and Time is on. The switch isn't grayed out, but it turns back on right away if a user turns it off.
A traveling user's Mac shows the wrong local time
The policy sets a fixed Time Zone, which overrides Set time zone automatically using your current location. Remove the time zone from the policy for that user's Mac, or assign it a policy without a time zone.
Users can't change the time zone
This is expected when Time Zone is set. The time zone city is grayed out, and automatic time zone by location is turned off.
The settings stayed after I removed the policy
This is expected. Removing the policy doesn't change the time server or time zone back. Assign a policy with the values you want, or change them on the Mac.
Force Automatic Date and Time has no effect
Check that the Mac runs macOS 10.15 or later.
Run
defaults read "/Library/Managed Preferences/com.apple.timed" TMAutomaticTimeOnlyEnabled. If it doesn't return1, the profile hasn't applied. Check the device's policy status in Swif.
Related resources
Swif
Apple