# Expire At a Specific Time

In this guide, you'll learn how you can configure a Grant Kit to automatically revoke access to a grant after some date. You'll do this by importing and using an expiration policy Abbey provides out-of-the-box.

We will be using the [Expire After a Duration](/use-cases/time-based-access/expire-after-a-duration.md) guide as a base and modify it to this use case.

## Step 1: Configure Your Policy

Write your policy using Abbey's expiration helper functions.

{% code title="common.rego" lineNumbers="true" %}

```rego
package common

import data.abbey.functions

allow[msg] {
  functions.expire_at("2023-06-15T04:00:00+00:00")
  msg := "granting access funtil 06/15/2023 4am UTC."
}
```

{% endcode %}

Unlike the `functions.expire_after` helper which uses a duration, the `functions.expire_at` takes an RFC 3339 datetime string.

{% hint style="info" %}
Abbey revokes grants in realtime. When the date and time is reached, the grant will be revoked immediately.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abbey.io/use-cases/time-based-access/expire-at-a-specific-time.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
