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

# Timezones

> How the API handles timezones, RFC 3339 timestamps and daylight saving time.

Flatpeak stores time in UTC, and the timestamps it generates, such as `time_created`, are in UTC. A request can use any timezone, and the response uses the same one.

Send RFC 3339 timestamps, in UTC (`2026-06-15T00:00:00Z`) or with an offset (`2026-06-15T00:00:00+10:00`). In a query string, encode `+` as `%2B`.

Choose one approach and keep to it:

* Send and store UTC, and convert to local time in your system.
* Or send the location's offset on every request.

## Daylight saving time

When a window crosses a daylight saving change, give `start_time` and `end_time` each its own offset. If the two offsets differ, the response uses the `end_time` offset.

## Example

Prices for a device in Sydney, requested in local time:

```bash Request theme={"system"}
curl --request GET \
  --url 'https://energy-api.flatpeak.com/devices/dev_63a6087272941ef077a8fd3e/prices?start_time=2026-06-15T19:00:00%2B10:00&end_time=2026-06-16T09:00:00%2B10:00' \
  --header 'Authorization: Bearer <bearer_token>'
```

```json Response (truncated) theme={"system"}
{
  "object": "price",
  "timezone": "Australia/Sydney",
  "data": {
    "import": [
      {
        "start_time": "2026-06-15T19:00:00+10:00",
        "end_time": "2026-06-16T09:00:00+10:00",
        "price": {
          "value": 0.31,
          "confidence": 1
        }
      }
    ],
    "export": []
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.