> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Incident timestamps

> Validate timestamp ordering to prevent incorrect durations and confusing timelines

Timestamps are a great way to keep track of key moments within your incidents. Within incident.io we provide several default timestamps for you and allow you to create additional timestamps - both automatic and manually filled.

In the heat of the moment, it can be hard to keep track of exactly when everything happened though, perhaps you made a mistake reading a log or pasted the wrong thing when manually entering them. Suddenly your statistics make no sense, you have a negative duration for your resolution time, or your post-mortem timeline just makes no sense.

Validation can help save you from confusing timelines and incorrect metrics.

## Enable validation on a duration metric

Duration metrics define a relationship between 2 timestamps by having a start and an end. You can use a duration metric to enforce that relationship in your timestamps by turning on validation.

[Navigate to your settings page and the timestamps tab](https://app.incident.io/~/settings/lifecycle?tab=timestamps), create a new metric or select an existing one to edit. Select the timestamps you wish to validate and that they are in the order you want to enforce.

Make sure to tick **Enable validation** and then click save.

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-1.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=6acd5a652a46516021c0a998a250426d" alt="Creating a duration metric with validation enabled" width="1060" height="1096" data-path="images/help-centre/validating-incident-timestamps/screenshot-1.png" />

## Validation when editing timestamps

Now that validation is enabled for that duration metric when you go to edit a timestamp in the dashboard and select the wrong date - you will be given a clear warning preventing you from submitting it.

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-2.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=1c9f6315883303c716a54165269a97a0" alt="A validation warning preventing submission of an out-of-order timestamp" width="1056" height="2254" data-path="images/help-centre/validating-incident-timestamps/screenshot-2.png" />

## Warning when resolving incidents

You may have also configured your timestamps to be required when marking an incident as resolved. The values you enter here may also result in invalid durations however as we do not want to increase unnecessary friction we warn users - and notify them within the incident channel (see below) to prompt someone to fix it.

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-3.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=2beae9d98033970c5190881a7fe88321" alt="A validation warning shown when resolving an incident with invalid timestamps" width="1068" height="1314" data-path="images/help-centre/validating-incident-timestamps/screenshot-3.png" />

## Invalid durations notifications

Some timestamps are automatically updated when an incident changes statuses, i.e. we will set the timestamp "Closed at" when an incident is closed. Depending on how you have configured your timestamps this automatic update may happen more than once (for example reopening and closing again an incident).

This means that over time some of the timestamps you might have manually set might now be invalid and no longer make sense.

We will highlight invalid timestamps in the details of the incident:

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-4.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=d9fe1a19dd95e4d086b652e47f11012a" alt="Invalid timestamps highlighted in the incident details panel" width="730" height="1034" data-path="images/help-centre/validating-incident-timestamps/screenshot-4.png" />

In addition to this and to help alert you when automatic changes have made a timestamp invalid we will post a message within the incident channel providing a helpful link to edit the duration directly.

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-5.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=b5a7c2d941fdf044ec5344235b962ab9" alt="A Slack message alerting that a timestamp is now invalid with a link to fix it" width="708" height="194" data-path="images/help-centre/validating-incident-timestamps/screenshot-5.png" />

Clicking this link takes you directly to an edit duration timestamps modal. From here you can quickly alter the dates and save.

<img src="https://mintcdn.com/incidentio-18bb4170/zaR7zcu-VIqt5-ZN/images/help-centre/validating-incident-timestamps/screenshot-6.png?fit=max&auto=format&n=zaR7zcu-VIqt5-ZN&q=85&s=169d3d720fd92187d60a4a5b0c895bab" alt="The edit duration timestamps modal for correcting invalid values" width="1050" height="1248" data-path="images/help-centre/validating-incident-timestamps/screenshot-6.png" />
