{
  "topic": "config.clock",
  "path": [
    "config",
    "clock"
  ],
  "title": "cyoda platform clock configuration",
  "synopsis": "The platform clock is the time cyoda records as business time: entity and audit dates, transition times and scheduled due times. By default it is the real clock and cannot be changed.",
  "body": "# config.clock\n\n## NAME\n\nconfig.clock — turn on the controllable platform clock, a test feature for moving business time.\n\n## DESCRIPTION\n\nThe platform clock is the time cyoda records as business time: entity and audit dates, transition times and scheduled due times. By default it is the real clock and cannot be changed.\n\n- `CYODA_CLOCK_CONTROL_ENABLED` (bool, default: `false`) — build a controllable clock, give it to the storage backend and to everything that reads business time, and accept `POST /platform/clock`. With `false`, `POST /platform/clock` answers `403 CLOCK_CONTROL_DISABLED` and `GET /platform/clock` answers real time at rate 1.\n\nThis is a test feature, not for production; startup logs a WARN when it is on. The clock is instance-wide: one setting affects every tenant. Changing it needs a platform operator; in mock IAM mode the one mock principal is an admin, and any admin passes as platform operator. Use the same value on every node of a cluster: a change is pushed to every node and answers only once every node holds it (`503 CLOCK_NOT_CONFIRMED` otherwise); a node that joins takes the setting from its peers; and the nodes need synchronised real clocks. A node that starts with no peer holding a setting starts on real time, and startup fails if the store holds times more than 1 s later than real time.\n\n## SEE ALSO\n\n- config\n- config.auth\n- config.cluster\n- run\n",
  "sections": [
    {
      "name": "NAME",
      "body": "config.clock — turn on the controllable platform clock, a test feature for moving business time."
    },
    {
      "name": "DESCRIPTION",
      "body": "The platform clock is the time cyoda records as business time: entity and audit dates, transition times and scheduled due times. By default it is the real clock and cannot be changed.\n\n- `CYODA_CLOCK_CONTROL_ENABLED` (bool, default: `false`) — build a controllable clock, give it to the storage backend and to everything that reads business time, and accept `POST /platform/clock`. With `false`, `POST /platform/clock` answers `403 CLOCK_CONTROL_DISABLED` and `GET /platform/clock` answers real time at rate 1.\n\nThis is a test feature, not for production; startup logs a WARN when it is on. The clock is instance-wide: one setting affects every tenant. Changing it needs a platform operator; in mock IAM mode the one mock principal is an admin, and any admin passes as platform operator. Use the same value on every node of a cluster: a change is pushed to every node and answers only once every node holds it (`503 CLOCK_NOT_CONFIRMED` otherwise); a node that joins takes the setting from its peers; and the nodes need synchronised real clocks. A node that starts with no peer holding a setting starts on real time, and startup fails if the store holds times more than 1 s later than real time."
    },
    {
      "name": "SEE ALSO",
      "body": "- config\n- config.auth\n- config.cluster\n- run"
    }
  ],
  "see_also": [
    "config",
    "config.auth",
    "config.cluster",
    "run"
  ],
  "stability": "experimental",
  "actions": []
}
