The following libraries have been added to the
of the application:
Library |
Company |
Function |
---|---|---|
SysTimeRtc |
System |
Provides the components to manage the RTC (Real-Time Clock) of the controller. |
TimeSync |
System |
Implements the SNTP (Simple Network Time Protocol) client feature. It allows the controller to connect to a time server in order to synchronize the internal RTC of the controller. |
To implement the timezone management in this application example, additional functions and data types have been created which are not provided within a library. These functions and data types are available in the application in the folder
.Additional functions and data types are listed in the following table:
Object name |
Type |
Description |
---|---|---|
|
STRUCT |
Data type to provide the date and time in a structured and ergonomic format. |
|
STRUCT |
Data type to define the switching limits for the daylight saving time. |
|
STRUCT |
Data type to provide the timezone configuration parameter used by the conversion functions. |
|
Function |
This function is used to calculate the switching limits for the daylight saving time for the selected year. |
|
Function |
This function is used to convert the date and time from the structured and ergonomic format into the UNIX time format. |
|
Function |
This function is used to convert the date and time from the UNIX time format into a structured and ergonomic format. |
|
Function |
This function is used to convert the local time from a structured and ergonomic format to the UTC (Coordinated Universal Time) in UNIX time format. The selected timezone configuration parameters are considered during the conversion. |
|
Function |
This function is used to convert the UTC from the UNIX time format to the local time in a structured and ergonomic format. The selected timezone configuration parameters are considered during the conversion. |
Global variable list |
Description |
---|---|
|
Contains variable declarations for variables accessible in the project and which are not needed to be retained after a cold start of the controller. |
|
Contains variables which are linked with the SNTP (Simple Network Time Protocol) client functionality. |
|
Contains the variable declaration of the configuration parameter. |