scanTimeUTC()
Determines the local time from a UTC time string.
Synopsis
time scanTimeUTC(string timeStr);
Parameters
| Parameter | Description |
|---|---|
| timeStr |
A UTC time string. In the WinCC OA format: "YYYY.MM.DD HH:MM:SS.mmm". or in the ISO format: "YYYY-MM-DDTHH:MM:SS.mmmZ" |
Return value
Local time
Errors
For example: no/incorrect parameters, incorrect format.
Details
This function determines the local time from a UTC time string.
Example in the WinCC OA format:
main()
{
time localTime = scanTimeUTC("2026.06.01 05:30:00.200"); // YYYY-MM-DD HH:MM:SS.mmm
DebugN("localTime: ", localTime);
}
Example in the ISO format:
main()
{
time localTime = scanTimeUTC("2026-06-01T05:30:00.200Z"); // YYYY-MM-DDTHH:MM:SS.mmmZ
DebugN("localTime: ", localTime); // Output: ["scanUTC: "][2026.06.01 07:30:00.200]
}
Assignment
Availability
CTRL
