Determine CSN update time from CSR in Directory Server 5/6
I needed to determine the update time for a particular attribute for one of my customers. I knew I had ran across how to get it from a csn attribute.
If you can obtain the CSN of an attribute, ie: from the nscpentrywsi operational attribute), the timestamp is the first 8 bytes of the CSN, in hex format.
ie:
nscpentrywsi: cn;adcsn-494d685d000000010000;vucsn-494d685d000000010000: The K
The timestamp in hex is: 494d685d
With a bit of perl magic, we can obtain the localtime value:
perl -e ‘print localtime(hex(”494d685d”)) . “\n”;’
Which returns:
Sat Dec 20 16:49:17 2008




