LDATE, LDT and LTOD types - incorrect units #539
Labels
bug
Something isn't working
language feature (norm)
a missing language feature according to iec61131-3
Projects
Describe the bug
LDATE, LDT and LTOD types measure unix-timestamps in milliseconds when it should be in nanoseconds (see DIN-EN 61131-3 Table 10 - Elementary data types: notes m to q)
To Reproduce
Convert any date to a unix timestamp in nanoseconds (e.g. Utc.ymd(1984, 1, 1).and_hms(0, 0, 0).timestamp_nanos() ) and compare it to an LDATE, LDT or LTOD of the same date returned from StdLib functions.
Tests
Failing tests in branch https://github.com/PLC-lang/StandardFunctions/tree/13-endianess-functions-iec61131-table-37
The text was updated successfully, but these errors were encountered: