win32 filetime conversion

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I need a function to convert a date/time (dd-mm-yyyy  hh:mm:ss) to a 64-bit  
win32 FILETIME and reversed.
Is this possible with PHP ?

Thansk in advance,


Re: win32 filetime conversion

But the only way I can think of doing it is messy.

Use strtotime() to get the Linux timestamp for a date (seconds since
January 1 1970 00:00:00 GMT), then add quite large interger to get it
to the number of seconds since January 1, 1601. Then you need to
multiply this by some factor of 10 to get into 100-nanosecond

Sorry, Can't be bothered to do it for you ;)

Btw, strptime() is nicer, but is only php5+

Not sure what your doing with the reverse bit though..

Re: win32 filetime conversion

I'll give it a try.
The reverse part is from a 64-bit value to a date/time.

Maybe i need to use some Perl code within my php.


Site Timeline