> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-lorawan-devices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/heating-schedules/device-time-and-time-zone.md).

# Device time & time zone

## Device time zone

This command offsets the time from the currently set one, allowing to compensate for the time zone difference.

{% hint style="warning" %}
When converting the value to decimal take care to account for the fact that the leftmost bit is the sign one, thus you would the signed 2's complement in order to have both positive and negative time zone offsets.
{% endhint %}

{% hint style="danger" %}
Take note that changing the time zone does not change the time actual time the device keeps, if you obtain the time via the GET command it will not account for the Time Zone shift.
{% endhint %}

{% tabs %}
{% tab title="SET" %}

<table><thead><tr><th width="125.97265625"></th><th></th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value / Meaning</strong></td></tr><tr><td>0</td><td>5F – command code</td></tr><tr><td>1</td><td>Offset hours (two's complement), range [-12:12]. Applied when setting time (0x5D).</td></tr></tbody></table>

**Example command:** `0x5FFD`

FD = -3, so when setting time with command `0x5D` three hours will be subtracted and the final result will be 3 hours behind.
{% endtab %}

{% tab title="GET" %}

<table><thead><tr><th width="112.3203125"></th><th width="213.5234375"></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Hex value – Meaning</strong></td><td></td></tr><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>60 – The command code.</td><td>60 – The command code.</td></tr><tr><td>1</td><td></td><td>Time correction in hours, as per Set command.</td></tr></tbody></table>

**Example command:** `0x60`

**Example response:** `0x6003`

`0x03` => three hours are added when setting time by `0x5D` command.
{% endtab %}
{% endtabs %}

Time zone lookup table:

| Negative zone shift | Command byte 1 value | Positive zone shift | Command byte 1 value |
| ------------------- | -------------------- | ------------------- | -------------------- |
| -12                 | 0xF4                 | 12                  | 0x0C                 |
| -11                 | 0xF5                 | 11                  | 0x0B                 |
| -10                 | 0xF6                 | 10                  | 0x0A                 |
| -9                  | 0xF7                 | 9                   | 0x09                 |
| -8                  | 0xF8                 | 8                   | 0x08                 |
| -7                  | 0xF9                 | 7                   | 0x07                 |
| -6                  | 0xFA                 | 6                   | 0x06                 |
| -5                  | 0xFB                 | 5                   | 0x05                 |
| -4                  | 0xFC                 | 4                   | 0x04                 |
| -3                  | 0xFD                 | 3                   | 0x03                 |
| -2                  | 0xFE                 | 2                   | 0x02                 |
| -1                  | 0xFF                 | 1                   | 0x01                 |

## Device time

In order the device to execute accurately its heating events in terms of week day, hour and minute, its time need to be set prior execute any heating event. If the LoRaWAN network server is unable to provide time to the device, when it's requested, the user is advised to set the device time once per week or at least at device join. Care should be taken to not remove the device batteries after it becomes offline. Otherwise the device time will be lost. Device operates with unsigned 32-bit UNIX timestamp which provides date and time until year of 2106.

{% hint style="warning" %}
This command is automatically appended to the device uplink following device join and later with period of 7 days.
{% endhint %}

{% hint style="danger" %}
If possible, the user should set the device time once per week or at least at device join. Care should be taken to not remove the device batteries after it becomes offline. Otherwise, the device time will be lost.
{% endhint %}

{% tabs %}
{% tab title="SET" %}

<table><thead><tr><th width="131.03515625"></th><th></th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value / Meaning</strong></td></tr><tr><td>0</td><td>5D – command code</td></tr><tr><td>1</td><td>Unix timestamp – MSB.</td></tr><tr><td>…</td><td>…</td></tr><tr><td>4</td><td>Unix timestamp – LSB.</td></tr></tbody></table>

**Example command:** `0x5D6860D660`

`0x6860D660` = 1751176800 – converted from unsigned 32-bit UNIX timestamp the value corresponds to Sun Jun 29 2025 06:00:00 GMT+0000.
{% endtab %}

{% tab title="GET" %}

<table><thead><tr><th width="107.44140625"></th><th width="219.02734375"></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Hex value – Meaning</strong></td><td></td></tr><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>5E – The command code.</td><td>5E – The command code.</td></tr><tr><td>1 … 4</td><td></td><td>Unix timestamp – MSB … LSB.</td></tr></tbody></table>

**Example command:** `0x5E`

**Example response:** `0x5E6860D660`

`0x6860D660` = 1751176800 – converted from unsigned 32-bit UNIX timestamp the value corresponds to Sun Jun 29 2025 06:00:00 GMT+0000.
{% endtab %}
{% endtabs %}

### Automatic time syncing using LoRaWAN Network Server

This command allows to stop/resume periodical time requesting by the corresponding MAC command. If not stopped, the device requests time from the network at join and later with period of 7 days.

{% tabs %}
{% tab title="SET" %}

<table><thead><tr><th width="123.48828125"></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value / Meaning</strong></td><td><strong>Bit</strong></td></tr><tr><td>0</td><td>6D – command code</td><td></td></tr><tr><td>1</td><td>00 – stops periodical time requesting.<br>01 – resume periodical time requesting (<strong>default for the device</strong>).</td><td></td></tr></tbody></table>

**Example 1:** `0x6D00` – stops periodical time requesting.
{% endtab %}

{% tab title="GET" %}

<table><thead><tr><th width="107.0703125"></th><th width="223.23046875"></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Hex value – Meaning</strong></td><td></td></tr><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>6E – The command code.</td><td>6E – The command code.</td></tr><tr><td>1</td><td></td><td>00 – periodical time requesting by MAC command is disabled.<br>01 – periodical time requesting by MAC command is enabled.</td></tr></tbody></table>

**Example request 1:** `0x6E`

**Example response 1:** `0x6E01` - periodical time requesting by MAC command is enabled.   &#x20;
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/heating-schedules/device-time-and-time-zone.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
