I have a trace file that each transaction time represented in Windows filetime format. These time numbers are something like this:
- 128166372003061629
- 128166372016382155
- 128166372026382245
Would you please let me know if there are any C/C++ library in Unix/Linux to extract actual time (specially second) from these numbers ? May I write my own extraction function ?
(I discovered I can't enter readable code in a comment, so...)
Note that Windows can represent times outside the range of POSIX epoch times, and thus a conversion routine should return an "out-of-range" indication as appropriate. The simplest method is:
Here's essentially the same solution except this one encodes negative numbers from Ldap properly and lops off the last 7 digits before conversion.
The solution that divides and adds will not work correctly with daylight savings.
Here is a snippet that works, but it is for windows.