> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/clock/timeread.md).

# TimeRead

## `TimeRead` (FB)

FUNCTION\_BLOCK TimeRead

### Short description

> Reading the current date and the current time.\
> Variant 1: Reading as since the start | Attention - always place only one TimeRead block per project. Also only one variant!

### Representation

<figure><img src="/files/7101fdf5aa1775a1bd1d18d961b3bff544684699" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name  | Data type | Value range | Initial value | Function                      |
| ----- | --------- | ----------- | ------------- | ----------------------------- |
| *xEN* | BOOL      |             |               | Enable / disable time reading |

#### Outputs

<table><thead><tr><th>Name</th><th width="148">Data type</th><th>Value range</th><th>Initial value</th><th>Function</th></tr></thead><tbody><tr><td><em>datDateAndTime</em></td><td>DATE_AND_TIME</td><td></td><td></td><td>Current date and current time</td></tr><tr><td><em>todTime</em></td><td>DATE</td><td></td><td></td><td>Current time</td></tr><tr><td><em>dtDate</em></td><td>DATE</td><td></td><td></td><td>Current date</td></tr></tbody></table>

#### Setpoints / Parameters

| Name                      | Data type                  | Value range | Initial value           | Function                 |
| ------------------------- | -------------------------- | ----------- | ----------------------- | ------------------------ |
| **stTimeZoneInformation** | DTU.RTCLK.TIME\_ZONE\_INfO |             | DTU.gc\_tziTimeZoneCET; | Time zone (default: CET) |

### Function description

#### General

This function block is used to read the current date and current time.\
The time zone is set via the data type TIME\_ZONE\_INFO.

### CODESYS

InOut:

| Scope  | Name             | Type   |
| ------ | ---------------- | ------ |
| Output | `datDateAndTime` | `DT`   |
| Output | `todTime`        | `TOD`  |
| Output | `dtDate`         | `DATE` |
| Output | `xIsLeapYear`    | `BOOL` |


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/clock/timeread.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
