---
title: "Platform Time"
method: GET
path: "/api/v1/time"
---

# Platform Time

`GET /api/v1/time`

## Request

- Base URL: `https://trovastorage.it` (the document declares no server; this is the origin it was published from)
- URL: `https://trovastorage.it/api/v1/time`
- Auth: none declared

The platform's sense of 'now' — the same value every time-dependent rule
on the server is evaluated against.

The SPA needs this because the browser clock is a *different clock*: it can
be wrong, and it is in the visitor's zone. A date derived from `new Date()`
can then be in the past for `create_hold`, and the booking is refused with
a 422. Found when a demo could still move the server's clock (M5.8 in
TODO.md); the two clocks were never guaranteed to agree.

Deliberately unauthenticated and not env-gated:
  * unauthenticated because it discloses nothing new — `/health` already
    publishes the ticker heartbeat, which *is* platform time — and because
    an expired session must not silently fall back to the wrong clock;
  * not env-gated because the frontend must not care which environment
    it is in. It is the system clock in all of them since M0.

`platform_tz` ships alongside because an instant is not a date. The server
resolves every date boundary in `PLATFORM_TZ` (M5.20) while the browser was
still slicing an ISO string, i.e. asking UTC — so between midnight and 02:00
in Rome the SPA sent yesterday's `start_date` and `create_hold` answered 422
(M5.22). The zone, not the date, because one sync at startup has to stay
correct across midnight; the browser recomputes the date from the offset it
already holds.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.dev/trovastorage/apis/stock-your-inventory.md) · [All operations](https://skmtc.dev/trovastorage/apis/stock-your-inventory/llms.txt) · [OpenAPI document](https://skmtc.dev/trovastorage/apis/stock-your-inventory/revisions/c75f591a585c?raw)
