Skip to main content

Apple Date Time Policy

Overview

The Apple Date Time Policy (APPLE_DATE_TIME_POLICY) allows you to control date and time settings on managed Apple devices. Use this policy to set a specific NTP time server, enforce a time zone, and lock automatic date and time synchronization so end users cannot disable it.

Policy type

APPLE_DATE_TIME_POLICY

Supported platforms

macOS

Minimum OS requirements

macOS 10.13+, iOS 12+, iPadOS 12+


Why use this policy?

When a device's system clock is significantly out of sync, the Swif agent can deadlock because sync operations depend on the correct time. Manually correcting the clock may require admin permissions and can itself fail when the device is already in a bad state.

Deploying the Apple Date Time Policy resolves this automatically — once the time zone and NTP settings are pushed, the device corrects its clock and resumes syncing with the Swif agent without manual intervention.


Policy fields

Time Server

Field name

timeServer

Display name

Time Server

Type

String

Required

No

Description

The NTP server the device connects to for time synchronization.

Minimum OS

macOS 10.13+

Examples: time.apple.com, pool.ntp.org


Time Zone

Field name

timeZone

Display name

Time Zone

Type

String

Required

No

Description

The time zone path location string as found in /usr/share/zoneinfo/.

Minimum OS

macOS 10.13+

Examples: America/Denver, America/New_York, Europe/London, Zulu

Tip: To list all available time zone identifiers on a Mac, run:

ls /usr/share/zoneinfo/


Force Automatic Date and Time

Field name

forceAutomaticDateAndTime

Display name

Force Automatic Date and Time

Type

Boolean

Required

No

Description

When set to true, the system enables the Set Automatically feature in System Settings → Date & Time and prevents the user from disabling it. The device updates its time zone only when it can determine its location using a cellular connection or Wi-Fi with Location Services enabled.

Minimum OS

macOS 10.13+, iOS 12+, iPadOS 12+


Example payload

{
"policyName": "APPLE_DATE_TIME_POLICY",
"policyType": "APPLE_DATE_TIME_POLICY",
"policy": {
"forceAutomaticDateAndTime": true,
"timeServer": "time.apple.com",
"timeZone": "America/Denver"
}
}

This configuration points the device to Apple's default NTP server, sets the time zone to Mountain Time (America/Denver), and locks automatic date and time so the user cannot turn it off.


How to create and assign the policy

  1. Log in to the Swif Web Portal.

  2. Navigate to Policies in the left sidebar.

  3. Click Create Policy.

  4. Select Apple Date Time Policy from the policy list.

  5. Configure the desired fields (time server, time zone, force automatic date and time).

  6. Click Save.

  7. Assign the policy to the appropriate device group or individual devices.

Once assigned, the policy is pushed to targeted devices on their next check-in.


Verifying the policy on a device

After the policy is deployed, confirm it is working:

Via System Settings:

  • Open System Settings → General → Date & Time.

  • Set time and date automatically should be enabled and grayed out (not toggleable by the user).

  • The configured time zone and NTP server should be reflected.

Via Terminal:

# Check the current NTP server
sudo systemsetup -getnetworktimeserver

# Check if network time is enabled
sudo systemsetup -getusingnetworktime

# Check the current time zone
sudo systemsetup -gettimezone

Expected output example:

Network Time Server: time.apple.com
Network Time: On
Time Zone: America/Denver

Troubleshooting

Symptom

Possible cause

Resolution

Device time does not update after policy deployment

Device cannot reach the NTP server (firewall or network restriction)

Ensure outbound access to the NTP server on UDP port 123 is allowed.

Time zone shows as incorrect

Wrong zone string in the policy

Verify the string matches an entry in /usr/share/zoneinfo/ (values are case-sensitive).

"Set Automatically" is not locked

forceAutomaticDateAndTime is not set to true

Edit the policy and set the field to true, then re-deploy.

Swif agent still not syncing after policy is applied

System clock was corrected but the agent has not restarted

Restart the Swif agent or wait for the next scheduled check-in.


Related resources

Did this answer your question?