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

# Timestamps

> How the Lemma API formats and accepts timestamps.

The Lemma API uses **ISO 8601** timestamps for all date and time values. This is the most widely supported timestamp format across programming languages and tools.

## Format

An ISO 8601 timestamp looks like this:

```
2026-03-15T14:30:00Z
```

| Part         | Meaning                                        |
| ------------ | ---------------------------------------------- |
| `2026-03-15` | Date in year-month-day order                   |
| `T`          | Separator between date and time                |
| `14:30:00`   | Time in 24-hour format (hours:minutes:seconds) |
| `Z`          | UTC timezone (also called "Zulu")              |

## Timezone offsets

Instead of `Z`, you can specify a UTC offset:

```
2026-03-15T09:30:00-05:00
```

This represents 9:30 AM Eastern Standard Time (UTC-5). The API converts all timestamps to UTC internally.

## Using timestamps in query parameters

When filtering by timestamp, pass the full ISO 8601 string as the parameter value:

```bash theme={null}
curl "https://api.getlemma.com/v0/transactions?posted_at.on_or_after=2026-03-01T00:00:00Z&posted_at.on_or_before=2026-03-31T23:59:59Z" \
  -H "Authorization: Bearer your_api_key"
```

## Generating timestamps

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    new Date().toISOString()
    // "2026-03-15T14:30:00.000Z"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from datetime import datetime, timezone

    datetime.now(timezone.utc).isoformat()
    # "2026-03-15T14:30:00+00:00"
    ```
  </Tab>

  <Tab title="Ruby">
    ```ruby theme={null}
    Time.now.utc.iso8601
    # "2026-03-15T14:30:00Z"
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    date -u +"%Y-%m-%dT%H:%M:%SZ"
    # 2026-03-15T14:30:00Z
    ```
  </Tab>
</Tabs>
