clock-info
Description
The clock-info block provides current information about the device's local date and time. It uses the time zone configured in the main system calendar, but operates independently of whether calendar program handling is enabled.
Values are refreshed every second. Unchanged values are not sent again. The description below the block shows local time without seconds in the YYYY-MM-DD HH:MM format, for example 2026-07-08 14:37, so a seconds-only change does not refresh the description.
The block is not a scheduler. It does not distinguish workdays, weekends, or holidays.
Configuration parameters
The clock-info block has no configuration parameters.
Input handling
The clock-info block has no inputs and does not react to signals from other blocks. Therefore, there are no ignored or invalid input values.
Block outputs
All numeric outputs have the integer type. Output no. 8 has the bool type.
| Output number and name | Output description |
|---|---|
1. year |
Full calendar year, for example 2026. |
2. month |
Month number in the range 1-12. |
3. day of month |
Day of month in the range 1-31. |
4. hour |
Hour in 24-hour format, in the range 0-23. |
5. minute |
Minute in the range 0-59. |
6. second |
Second in the range 0-59. |
7. day of week number |
Day of week number: 1 = Monday, ..., 7 = Sunday. |
8. is leap year |
true when the current year is a leap year; otherwise false. |
9. week of year number |
ISO-8601 week number in the range 1-53. |
10. week of month number |
Week number according to the first-Monday rule, in the range 0-5. |
11. day of year number |
Day number in the year, in the range 1-365, or 1-366 in a leap year. |
12. number of days in month |
Number of days in the current month, including 29 days in February in a leap year. |
13. season number |
Meteorological season: 1 = winter, 2 = spring, 3 = summer, 4 = autumn. |
Leap year
A year is a leap year when it is divisible by 400, or when it is divisible by 4 but not by 100. Therefore, for example, 2000 is a leap year, 2100 is not, and 2024 is a leap year. The same rule affects the is leap year, day of year number, and number of days in month outputs.
Week of year number
The week number follows ISO-8601. A week starts on Monday, and week 1 is the week containing the first Thursday of the year. Thursday is used as the reference point because it is the week's “center of gravity.” Therefore, the first days of January may belong to week 52 or 53 of the previous year, while the last days of December may belong to week 1 of the following year. The output provides only the week number, without the ISO week-numbering year.
Week of month number
A week starts on Monday. The first Monday occurring in the month starts week 1. If the month does not begin on a Monday, the initial days before the first Monday have week number 0. Each following Monday increases the number by 1, and the final days of the month retain the number assigned by the last Monday.
Season number
Seasons are meteorological and depend only on the month:
- winter (
1): December, January, and February - spring (
2): March, April, and May - summer (
3): June, July, and August - autumn (
4): September, October, and November
Errors visible to the user
When an error occurs, all outputs have the null value. The block does not resend unchanged null values.
| Error code | Error description |
|---|---|
Time unavailable. |
Local time could not be read or converted. The block retries and resumes normal operation after a successful read. |
Timer error. |
The next time-data refresh could not be scheduled. |
Examples
- For local time
2026-07-08 14:37:05, the block returns, among other values: year2026, month7, day of month8, hour14, minute37, second5, Wednesday as day of week3, ISO week28, week of month1, day of year189,31days in the month, and summer as season3. The leap-year output is false. - For
2024-02-29, theis leap yearoutput is true, the day of year number is60, and the number of days in the month is29. - For
2021-01-01, the ISO week number is53because that day belongs to the last ISO week of the previous year. The week of month number is0because the first Monday in January occurs on January 4.