You are here: Re: [PHP] How to handle a 64bit FILETIME? « PHP « IT news, forums, messages
Re: [PHP] How to handle a 64bit FILETIME?

Posted by Richard Lynch on 03/03/05 20:42

Tom Cannaerts wrote:
> I'm processing a binary file, and in that file there is a 64bit FILETIME
> value. This value represents the number of 100-nanoseconds since 1/1/1601.
>
> I would like to convert it to a somewhat more usable value, since I
> eventually will need to display that value as a human readable date.

In addition to the BC_MATH package, there's some new-fangled extension to
PHP that does the same kind of stuff.

I'm not quite sure how you are going to get the 32 bytes into a string
suitable for sending *TO* either of those packages, however...

I'm guessing you'll have to read 32 bits, throw that into BC_MATH,
multiply by 0xFFFFFFFF, grab the next 32 bits, and add that in BC_MATH...

Then, you'll have to divide by 100-nanoseconds and/or subtract enough
seconds to get to whatever time format you want to use.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация