TimeZoneSettingsV1
Information regarding device timezone settings, action to modify the settings and notifications when the device experience a time update.
Trait Type: Standard
Action Mutations
Note: See Overview: Device Action Lifecycle for more information on action flows
TimeZoneSettingsV1SetTimeZoneOffset action
Modify writable timezone settings state.
Mutation Inputs
Input Name | Description | Data Type | Nullable |
deviceId | uuid of the device to which mutation should apply | ID! | false |
traitActionArgs | See table below for specific fields. | setTimeZoneOffsetArgs! | false |
Argument Fields
Field Name | Description | Data Type | Nullable |
timeZoneOffset | The desired timezone offset value the device should use to determine the local time. | int | true |
dstSetting | Should daylight savings time be enabled or disabled. | dstSettingEnum | true |
dstStart | The day and time the daylight savings time is expected to start. MDWH Format is based on device expectation where M = Month (1 = Jan, …), D = day of week (0 = Sunday, …), W = Week of month (1=1st, ..5 = last), and H = hour. US default = 3022 | string | true |
dstEnd | The day and time the daylight savings time is expected to end. MDWH Format is based on device expectation where M = Month (1 = Jan, …), D = day of week (0 = Sunday, …), W = Week of month (1=1st, ..5 = last), and H = hour. US default = B012 | string | true |
dstOffset | The value representing number of seconds that daylight savings time offsets. | int | true |
dstSettingEnum Values
Enumerated Value | Description |
ENABLED | Daylight Savings Time is enabled on the device. |
DISABLED | Daylight Savings Time is disabled on the device. |
GQL Examples
Request Example
mutation TimeZoneSettingsV1SetTimeZoneOffset {
TimeZoneSettingsV1SetTimeZoneOffset(
deviceId: "9a8f6104-6c50-476e-90ee-16b9a2dafc8d"
traitActionArgs: {
timeZoneOffset: -25200
dstSetting: ENABLED
dstStart: "3022"
dstEnd: "B012"
dstOffset: 3600
}
) {
deviceId
actionId
traitName
}
}
Response Example
{
"data": {
"TimeZoneSettingsV1SetTimeZoneOffset": {
"actionId": "7eb3629a-a1c3-49f0-89b6-2831d500ac68",
"deviceId": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d"
}
}
}Reported States
Note: See Overview: Device Reported State for more information on reported state flows.
State Definitions
timeZoneOffset state
Indicates the timezone offset value the device is using to determine the local time.
Data Type: int
dstSetting state
Indicates whether daylight savings time is enabled or disabled.
Data Type: enum
Valid Values
Enumerated Value | Description |
ENABLED | Daylight Savings Time is enabled on the device. |
DISABLED | Daylight Savings Time is disabled on the device. |
UNSUPPORTED | Device has not yet reported a value for this field. |
dstStart state
The day and time the daylight savings time is expected to start. MDWH Format is based on device expectation where M = Month (1 = Jan, …), D = day of week (0 = Sunday, …), W = Week of month (1=1st, ..5 = last), and H = hour. US default = 3022
Data Type: string
dstEnd state
The day and time the daylight savings time is expected to end. MDWH Format is based on device expectation where M = Month (1 = Jan, …), D = day of week (0 = Sunday, …), W = Week of month (1=1st, ..5 = last), and H = hour. US default = B012
Data Type: string
dstOffset state
The value representing number of seconds that daylight savings time offsets.
Data Type: int
Device State Query GQL Examples
Request Example
query Device {
device(deviceId: "9a8f6104-6c50-476e-90ee-16b9a2dafc8d") {
id
traits {
... on TimeZoneSettingsV1DeviceTrait {
name
state {
timeZoneOffset {
reported {
value
}
}
dstSetting {
reported {
value
}
}
dstStart {
reported {
value
}
}
dstEnd {
reported {
value
}
}
dstOffset {
reported {
value
}
}
}
}
}
}
}Response Example
{
"data": {
"device": {
"id": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traits": [
{
"name": "TimeZoneSettingsV1",
"state": {
"timeZoneOffset": {
"reported": {
"value": -25200
}
},
"dstSetting": {
"reported": {
"value": "ENABLED"
}
},
"dstStart": {
"reported": {
"value": "3022"
}
},
"dstEnd": {
"reported": {
"value": "B012"
}
},
"dstOffset": {
"reported": {
"value": 3600
}
}
}
}
]
}
}
}What made this section unhelpful for you?
On this page
- TimeZoneSettingsV1