Перейти к основному содержанию
GET
/
v1
/
service
/
time
JavaScript
import Gmt from 'gmt-typescript-sdk';

const client = new Gmt();

const response = await client.service.getServerTime();

console.log(response.epochMs);
{
  "iso": "2024-01-15T12:00:00.000Z",
  "epochMs": 1705320000000,
  "timezone": "UTC"
}

Ответ

200 - application/json

Successful response.

Successful response.

iso
string
обязательно

Current server time in ISO 8601 format.

Пример:

"2024-01-15T12:00:00.000Z"

epochMs
integer
обязательно

Current server time in milliseconds since Unix epoch.

Требуемый диапазон: 0 <= x <= 9007199254740991
Пример:

1705320000000

timezone
string
обязательно

Server timezone.

Пример:

"UTC"