{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/v2.7.0-rc3/schemas/timeGet.json",
    "type": "object",
    "title": "Gateway time information",
    "example": {
        "zoneName": "Europe/Prague",
        "abbreviation": "CEST",
        "gmtOffset": "+0200",
        "gmtOffsetSec": 7200,
        "formattedZone": "Europe/Prague (CEST, +0200)",
        "utcTimestamp": 1659265941,
        "localTimestamp": 1659273141,
        "formattedTime": "2022-07-31 13:12:21",
        "ntpSync": true,
        "ntpServers": []
    },
    "required": [
        "zoneName",
        "abbreviation",
        "gmtOffset",
        "gmtOffsetSec",
        "formattedZone",
        "utcTimestamp",
        "localTimestamp",
        "formattedTime",
        "ntpSync",
        "ntpServers"
    ],
    "additionalProperties": false,
    "properties": {
        "zoneName": {
            "title": "Timezone name",
            "description": "Timezone identifier",
            "type": "string",
            "example": "Europe/Prague"
        },
        "abbreviation": {
            "title": "Timezone abbreviation",
            "description": "Abbreviation (code) if available, otherwise GMT offset is used.",
            "type": "string",
            "example": "CEST"
        },
        "gmtOffset": {
            "title": "GMT offset",
            "description": "Difference to GMT.",
            "type": "string",
            "example": "+0200"
        },
        "gmtOffsetSec": {
            "title": "GMT offset in seconds",
            "description": "Timezone offset in seconds. Subtract from local to get UTC.",
            "type": "integer",
            "minimum": -43200,
            "maximum": 50400,
            "example": 7200
        },
        "formattedZone": {
            "title": "Formatted timezone",
            "description": "Timezone string with abbreviation and offset.",
            "type": "string",
            "example": "Europe/Prague (CEST, +0200)"
        },
        "utcTimestamp": {
            "title": "UTC timestamp",
            "description": "Seconds since Unix Epoch UTC",
            "type": "integer",
            "example": 1659265941
        },
        "localTimestamp": {
            "title": "Local timestamp",
            "description": "Local time in Unix time.",
            "type": "integer",
            "example": 1659273141
        },
        "formattedTime": {
            "title": "Formatted time",
            "description": "Human readable local date and time string.",
            "type": "string",
            "example": "2022-07-31 13:12:21"
        },
        "ntpSync": {
            "title": "NTP enabled",
            "description": "NTP time synchronization.",
            "type": "boolean",
            "example": true
        },
        "ntpServers": {
            "title": "NTP servers",
            "description": "Servers to use as authoritative servers when synchronizing time.",
            "type": "array",
            "items": {
                "title": "NTP server",
                "description": "Server IP address or hostname.",
                "anyOf": [
                    {
                        "type": "string",
                        "format": "hostname"
                    },
                    {
                        "type": "string",
                        "format": "ipv4"
                    },
                    {
                        "type": "string",
                        "format": "ipv6"
                    }
                ]
            }
        }
    }
}
