I'm implementing the OpenConfig interfaces in a protocol and I'm stuck at the "last-change" property. The value we get is "3600000000000"
In the documentation we have some details what this value represents.
It is also possible to poll this with SNMP and with some calculations we get that the value was last changed on "31/05/2023 14:42:09".
How do I get the value in OpenConfig to the same datetime as SNMP?
First issue was that this code didn't work:
Changed it to:
Now I get the DateTime value in the column.
For the values where I get "3600000000000", it means that the interface has not changed since the system restart. The values in the column where the value is "01/01/1970 01:00:00" can be changed to the date/time of the system restart.
That doesn't seem to be a valid value. According to the documentation it should be the timestamp in nanoseconds relative to Unix Epoch (Jan 1, 1970 00:00:00 UTC). When value "31/05/2023 14:42:09" gets translated into Unix Epoch then this is 1685544129000000 in nanoseconds, which is different to the value 3600000000000.
Even if that value would be representing hundredths of a seconds (which is the definition of "yang:timeticks"), then we still end up in the year 2084, which is not really close to 2023.
It seems at first sight that a value is received that is not making sense according to the documentation.
Regards,