<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "ManagedSettings",
  "identifier" : "/documentation/ManagedSettings/DateAndTimeSettings",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Managed Settings"
    ],
    "preciseIdentifier" : "s:15ManagedSettings011DateAndTimeB0V"
  },
  "title" : "DateAndTimeSettings"
}
-->

# DateAndTimeSettings

Constraints on the device’s date and time settings.

```
struct DateAndTimeSettings
```

## Overview

Use `DateAndTimeSettings` to prevent the user from changing their device’s date and time.

## Topics

### Requiring automatic date and time

[`requireAutomaticDateAndTime`](/documentation/ManagedSettings/DateAndTimeSettings/requireAutomaticDateAndTime-swift.property)

A Boolean value that indicates whether to prevent the user from changing their device’s date and time.

[`requireAutomaticDateAndTime`](/documentation/ManagedSettings/DateAndTimeSettings/requireAutomaticDateAndTime-swift.type.property)

The metadata for the constraint that configures the date and time setting.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)