The IODD data type TimeT is mapped to an OPC UA DataType DateTime.
The IODD data type TimeT has a length of 8 bytes, consisting of two 32bit unsigned integers. The bytes 1 to 4 represent the seconds starting from 19000101 0.00,00 (UTC) and the bytes 5 to 8 represent the fractional part of the current second in seconds. Because the time range before 19840101 0:00,00 (UTC) is in the past (where IOLink did not exist), the time values (seconds) from 0x00000000 to 0x9DFF4400 (exclusive) are mapped to the time after 20360207 6.28,16 (UTC). See IOLink Specificationfor more details.
The OPC UA DataType DateTime consists of a 64bit signed integer which represents the number of 100 nanosecond intervals (seconds) since January 1, 1601 (UTC).
The OPC UA DataType provides a larger range whereas the IOLink data type provides a higher precision. Therefore, the following conversion rules shall apply (see OPC 100006). Implementers shall ensure that the time value mappings are done as exactly as possible.
Consider the borders of the IOLink TimeT value range:
 If the IOLink TimeT value is equal to the smallest possible IOLink time value (19840101 0:00,00 (UTC), seconds value: 0x9DFF4400, fractional seconds value: 0), the OPC UA DateTime value shall be 0.
 If the IOLink TimeT value is equal to the highest possible IOLink time value (21200207 6:28,15 (UTC), seconds value: 0x9DFF4399, fractional seconds value 0xFFFFFFFF), the OPC UA DateTime value shall be 0x7FFFFFFFFFFFFFFF (maximum value for 64bit signed integer).
If none of the rules above apply, the IOLink TimeT rollover has to be considered:
 If the IOLink TimeT value is smaller than (19840101 0:00,00 (UTC), seconds value: 0x9DFF4400, fractional seconds value: 0), the time base offset has to be the difference between 16010101 0:00:00 and 20360207 6.28,16 (UTC).
 If the IOLink TimeT value is bigger than (19840101 0:00,00 (UTC)), the time base offset has to be the difference between 16010101 0:00:00 (UTC) and 19010101 0:00:00 (UTC).
The time value conversion works according to the following formula:
Consider the borders of the IOLink TimeT value range:
 If the OPC UA DateTime value is equal or greater than 21200207 6:28,15 (UTC), the IOLink TimeT value shall be 21200207 6:28,15 (UTC), seconds value: 0x9DFF4399, fractional seconds value 0xFFFFFFFF).
 If the OPC UA DateTime value is equal or smaller than 19840101 0:00,00 (UTC), the IOLink TimeT value shall be 19840101 0:00,00 (UTC), seconds value: 0x9DFF4400, fractional seconds value: 0).
If none of the rules above apply, the IOLink TimeT rollover has to be considered:
 If the OPC UA DateTime value is equal or greater than 20360207 6.28,16 (UTC), the time base offset has to be the difference between 16010101 0:00:00 and 20360207 6.28,16 (UTC).
 If the OPC UA DateTime value is smaller than 20360207 6.28,16 (UTC), the time base offset has to be the difference between 16010101 0:00:00 and 19010101 0:00:00 (UTC).
The time value conversion works according to the following formulas:
Table 64and Table 65list some special values and their conversion to the other time data type. They can be used as a base set to test the conversion algorithm implementation (together with other inputoutput pairs).
Table 64– OPC UA DateTime to IOLink TimeT – Special values
Input (OPC UA DateTime) 
Output (IOLink TimeT) 

Seconds value 
Description 
Seconds value 
Date/time value before 1984/01/01 0:00:00,000AM (inclusive) 
Date/time value is "truncated" 
1984/01/01 00:00:00,000AM 
Date/time value after 2120/02/07 06:28:15,999AM (inclusive) 
Date/time value is "truncated" 
2120/02/07 06:28:15,999AM 
0 
Minimal OPC UA DateTime value = 1601/01/01 12:00:00,000AM 
1984/01/01 00:00:00,000AM 
INT64_MAX (0x7FFFFFFFFFFFFFFF) 
Maximal OPC UA DateTime value = 9999/12/31 11:59:59,000PM 
2120/02/07 06:28:15,999AM 
Table 65– IOLink TimeT to OPC UA DateTime – Special values
Input (IOLink TimeT) 
Output (OPC UA DateTime) 

Seconds value 
Description 
Seconds value 
1984/01/01 00:00:00,000AM 
Minimal IOLink TimeT value 
0 
2120/02/07 06:28:15,000AM 
Maximal IOLink TimeT value 
INT64_MAX 
0 
First number after IOLink TimeT rollover 
2036/02/07 06:28:17,000AM 
seconds = UINT32_MAX, fSeconds = UINT32_MAX 
Last number before IOLink TimeT rollover 
2036/02/07 06:28:16,999AM 