Platform Time

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.

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

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.