How might one implement FileTimeToSystemTime?

Posted by Billy ONeal on Stack Overflow See other posts from Stack Overflow or by Billy ONeal
Published on 2010-06-16T06:04:04Z Indexed on 2010/06/16 6:12 UTC
Read the original article Hit count: 241

Filed under:
|

Hello :)

I'm writing a simple wrapper around the Win32 FILETIME structure. boost::datetime has most of what I want, except I need whatever date type I end up using to interpolate with Windows APIs without issues.

To that end, I've decided to write my own things for doing this -- most of the operations aren't all that complicated. I'm implementing the TimeSpan - like type at this point, but I'm unsure how I'd implement FileTimeToSystemTime. I could just use the system's built-in FileTimeToSystemTime function, except FileTimeToSystemTime cannot handle negative dates -- I need to be able to represent something like "-12 seconds".

How should something like this be implemented?

Billy3

© Stack Overflow or respective owner

Related posts about c++

Related posts about datetime