# Jira date time picker custom field: set and read via API

URL: https://goingstellar.ro/reference/jira-fields/date-time-field/

The date time picker accepts an ISO timestamp with an offset or with Z and answers with the time written in the offset of the calling user. The instant is the same, only the notation changes.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| PUT | `/rest/api/3/issue/{issueIdOrKey}` | Sets or changes the value. |
| GET | `/rest/api/3/issue/{issueIdOrKey}` | Reads the stored value. |
| GET | `/rest/api/3/issue/{issueIdOrKey}/editmeta` | Lists what can be edited. |

## Examples

### PUT /rest/api/3/issue/{issueIdOrKey}

Sends 10:30 at +0000 and receives 12:30 at +0200.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10170": "2026-12-15T10:30:00.000+0000"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10170'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10170',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10170'},
    json={'fields': {'customfield_10170': '2026-12-15T10:30:00.000+0000'}},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "fields": {
  "customfield_10170": "2026-12-15T12:30:00.000+0200"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}

A trailing Z without milliseconds is accepted and gives the same stored value.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10170": "2026-12-15T10:30:00Z"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10170'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10170',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10170'},
    json={'fields': {'customfield_10170': '2026-12-15T10:30:00Z'}},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "fields": {
  "customfield_10170": "2026-12-15T12:30:00.000+0200"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}

A date and time with a space and no offset is refused.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10190": "2026-12-15 10:30"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10190'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10190',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10190'},
    json={'fields': {'customfield_10190': '2026-12-15 10:30'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [],
 "errors": {
  "customfield_10190": "Check the format of zz-ref datetime"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}

The rendered form uses the display format with day, month and a 12-hour clock.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=customfield_10163,customfield_10169,customfield_10170' \
  --data-urlencode 'expand=renderedFields' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'fields': 'customfield_10163,customfield_10169,customfield_10170', 'expand': 'renderedFields'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "renderedFields": {
  "customfield_10170": "15/Dec/26 12:30 PM"
 },
 "fields": {
  "customfield_10170": "2026-12-15T12:30:00.000+0200"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}/editmeta

Edit metadata lists the operation set for the field.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/editmeta'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/editmeta',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "fields": {
  "customfield_10170": {
   "name": "zz-ref datetime",
   "operations": [
    "set"
   ]
  }
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- Type key com.atlassian.jira.plugin.system.customfieldtypes:datetime, searcher key com.atlassian.jira.plugin.system.customfieldtypes:datetimerange, schema type datetime, display name "Date Time Picker".
- "2026-12-15T10:30:00.000+0000" answered 200 and read back as "2026-12-15T12:30:00.000+0200", the same instant in the offset of that user's profile, which is Europe/Bucharest in the user object returned by other runs.
- "2026-12-15T10:30:00Z" was accepted too and read back identically.
- "2026-12-15 10:30" gave 400 "Check the format of zz-ref datetime".
- The rendered string was "15/Dec/26 12:30 PM".

## Pitfalls

- Comparing the string you sent with the string you read fails when the offsets differ; parse both into instants.
- The bad-format message differs from the date picker's, which quotes a pattern; this one only asks to check the format.
- Rendered values follow the viewing user's format and time zone, so use fields for machine reads.

## Questions and answers

### Is the stored time converted?

The instant is kept, and the notation in the response uses the offset of the calling user, so 10:30 at +0000 came back as 12:30 at +0200.

## Related

- [Date picker](https://goingstellar.ro/reference/jira-fields/date-picker-field/)
- [duedate](https://goingstellar.ro/reference/jira-fields/duedate-field/)
- [Reading field values: names, schema, v2 and v3](https://goingstellar.ro/reference/jira-fields/reading-field-values/)
- [JQL on custom fields](https://goingstellar.ro/reference/jira-fields/jql-on-custom-fields/)
- [Which fields can be set: editmeta and createmeta](https://goingstellar.ro/reference/jira-fields/editmeta-createmeta-fields/)

## Sources

- [Issues (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/)
- [Issue fields (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/)

