Get device time and timezone
Get current device time and timezone. Also returns Network Time Protocol (NTP) settings.
- 200
- 401
OK
- application/json
- Schema
- Example (from schema)
Schema
- timestamp int64
Unix Timestamp Date
timezones object
Device current timezone and list of available
current stringPossible values: [
UTC-12:00,UTC-11:00,UTC-10:00,UTC-09:30,UTC-09:00,UTC-08:00,UTC-07:00,UTC-06:00,UTC-05:00,UTC-04:00,UTC-03:30,UTC-03:00,UTC-02:00,UTC-01:00,UTC±00:00,UTC+01:00,UTC+02:00,UTC+03:00,UTC+03:30,UTC+04:00,UTC+04:30,UTC+05:00,UTC+05:30,UTC+05:45,UTC+06:00,UTC+06:30,UTC+07:00,UTC+08:00,UTC+08:45,UTC+09:00,UTC+09:30,UTC+10:00,UTC+10:30,UTC+11:00,UTC+12:00,UTC+12:45,UTC+13:00,UTC+14:00]This model represents one time zone
available string[]Possible values: [
UTC-12:00,UTC-11:00,UTC-10:00,UTC-09:30,UTC-09:00,UTC-08:00,UTC-07:00,UTC-06:00,UTC-05:00,UTC-04:00,UTC-03:30,UTC-03:00,UTC-02:00,UTC-01:00,UTC±00:00,UTC+01:00,UTC+02:00,UTC+03:00,UTC+03:30,UTC+04:00,UTC+04:30,UTC+05:00,UTC+05:30,UTC+05:45,UTC+06:00,UTC+06:30,UTC+07:00,UTC+08:00,UTC+08:45,UTC+09:00,UTC+09:30,UTC+10:00,UTC+10:30,UTC+11:00,UTC+12:00,UTC+12:45,UTC+13:00,UTC+14:00]This model describes the list of supported timezones
ntp object
NTP settings
NTP parameters(server) are only required if is_enabled == true
is_enabled booleanDescribes if NTP is enabled on device
server stringCustom NTP server hostname
dst object
Settings of Daylight Saving Time (DST) offsets from UTC in hours and minutes
DST parameters(delta, start, end) are only required if is_enabled == true
oneOf- MOD1
- MOD2
is_enabled booleanFeature activation
start object
This model describes time change rule
month integerPossible values:
>= 1and<= 12Month number
day stringPossible values: [
last_thursday,last_friday,friday_before_last_sunday,first_saturday,last_saturday,saturday_before_last_sunday,first_sunday,second_sunday,fourth_sunday,last_sunday]Day of the month
hour integerPossible values:
<= 23Hour of the day
end object
This model describes time change rule
month integerPossible values:
>= 1and<= 12Month number
day stringPossible values: [
last_thursday,last_friday,friday_before_last_sunday,first_saturday,last_saturday,saturday_before_last_sunday,first_sunday,second_sunday,fourth_sunday,last_sunday]Day of the month
hour integerPossible values:
<= 23Hour of the day
is_enabled booleanFeature activation
{
"timestamp": 1540819272,
"timezones": {
"current": "UTC+03:00",
"available": [
"UTC-12:00",
"UTC-11:00",
"UTC-10:00",
"UTC-09:30",
"UTC-09:00",
"UTC-08:00",
"UTC-07:00",
"UTC-06:00",
"UTC-05:00",
"UTC-04:00",
"UTC-03:30",
"UTC-03:00",
"UTC-02:00",
"UTC-01:00",
"UTC±00:00",
"UTC+01:00",
"UTC+02:00",
"UTC+03:00",
"UTC+03:30",
"UTC+04:00",
"UTC+04:30",
"UTC+05:00",
"UTC+05:30",
"UTC+05:45",
"UTC+06:00",
"UTC+06:30",
"UTC+07:00",
"UTC+08:00",
"UTC+08:45",
"UTC+09:00",
"UTC+09:30",
"UTC+10:00",
"UTC+10:30",
"UTC+11:00",
"UTC+12:00",
"UTC+12:45",
"UTC+13:00",
"UTC+14:00"
]
},
"ntp": {
"is_enabled": true,
"server": "pool.0.ntp.org"
},
"dst": {
"is_enabled": true,
"start": {
"month": 1,
"day": "last_sunday",
"hour": 2
},
"end": {
"month": 1,
"day": "last_sunday",
"hour": 2
}
}
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Error object, contains error details
code stringPossible values: [
invalid_authentication,permission_denied,not_valid,system_error,bad_request,connection_timeout]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringContains validation error details
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "invalid_authentication",
"message": "Invalid authentication"
}
}