Server Time API

Server Data

GET
/api/time.php
Get server time (requires API TOKEN)
GET
/api/time.php?utc=+1
Get server time +1 hour offset (requires API TOKEN)
GET
/api/time.php?utc=-2
Get server time -2 hours offset (requires API TOKEN)
GET
/api/discover.php
List enabled service regions + suggested region (public, no token)
GET /api/time.php
Request:
$ curl -X GET "/api/time.php" \
  -H "X-Api-Token: API_KEY"
Response:
{
  "success": true,
  "utc": "2026-03-13T14:01:49+00:00",
  "timestamp": 1773410509,
  "readable": "2026-03-13 14:01:49 UTC"
}
GET /api/time.php?utc=+1
Request:
$ curl -X GET "/api/time.php?utc=+1" \
  -H "X-Api-Token: API_KEY"
Response:
{
  "success": true,
  "utc": "2026-03-13T15:04:17+00:00",
  "timestamp": 1773414257,
  "readable": "2026-03-13 15:04:17 UTC",
  "offset": {
    "offset_hours": 1,
    "offset_string": "+1",
    "original_utc": "2026-03-13T14:04:17+00:00",
    "original_timestamp": 1773410657
  }
}
GET /api/time.php?utc=-2
Request:
$ curl -X GET "/api/time.php?utc=-2" \
  -H "X-Api-Token: API_KEY"
Response:
{
  "success": true,
  "utc": "2026-03-13T12:05:13+00:00",
  "timestamp": 1773403513,
  "readable": "2026-03-13 12:05:13 UTC",
  "offset": {
    "offset_hours": -2,
    "offset_string": "-2",
    "original_utc": "2026-03-13T14:05:13+00:00",
    "original_timestamp": 1773410713
  }
}
GET /api/discover.php
Public — no token. SDKs fetch this once, ping each node's own discover endpoint, then use the fastest node's api_url as their base URL. suggested_region is the server's geo hint only.
Request:
$ curl -X GET "/api/discover.php"
Response:
{
  "success": true,
  "nodes": [
    {
      "region": "eu",
      "label": "Netherlands (Amsterdam)",
      "api_url": "https://api.michitai.com/api",
      "realtime": {
        "host": "realtime.michitai.com",
        "port": 443,
        "protocol": "wss",
        "udp_port": 3000
      }
    }
  ],
  "suggested_region": "eu"
}