Synchronizing Timezones

In order to set its timezone a device must send a getTimezone to the backend. Then it will answer with a syncTimezone payload.

hide footbox
title Payload direction
device -> cloud: getTimezone
cloud -> device: syncTimezone

Get Timezone

Payload

 {
"event": "getTimezone",
"timestamp": "[TIMESTAMP]",
"uid": "[PAYLOAD_UID]",
"modules": [
  {
    "id": "[MODULE_UID]",
    "device": {}
  }
]
}

See [TIMESTAMP], [PAYLOAD_UID], [MODULE_UID|NAME|TYPE]

Sync Timezone

Payload

{
 "action":"syncTimezone",
 "timestamp":"[TIMESTAMP]",
 "uid": "[PAYLOAD_UID]",
     "modules": [
     {
         "id":"[MODULE_UID]",
         "device":{
             "timezone": "[TIMEZONE]",
             "timezoneOffset": [TIMEZONE_OFFSET], # integer value for the offset in seconds from UTC. For example Asia/Shanghai is -28800
             "shortTimezone":"[SHORT_TIMEZONE]"
                     }
             }
     ]
}

See [TIMESTAMP], [PAYLOAD_UID], [MODULE_UID|NAME|TYPE]