I have done some Googling and have yet to find a solution to a problem I
have. I am trying to decode a Windows filetime value e.g. LoTime,HiTime.
These values are commonly found in the registry and I have yet to find a
library in Ruby to deal with them and convert them to a valid date?
I have done some Googling and have yet to find a solution to a problem I
have. I am trying to decode a Windows filetime value e.g. LoTime,HiTime.
These values are commonly found in the registry and I have yet to find a
library in Ruby to deal with them and convert them to a valid date?
Any suggestions?
Google "ruby windows timestamp" (without the quotes)
The first hit is code.
The third google hit contains this link:
Combine the two 32-bit values to get a 64-bit value which is the number
of tenths of a microsecond since 1 Jan 1601.
Google also:
"site:www.ruby-forum.com active directory timestamp"
It looks like Win32::Registry.wtime2time() (RDoc Documentation
libdoc/Win32API/rdoc/classes/Win32/Registry.html#M001570)
might do the trick.
···
On Sep 17, 10:19 am, Brian Candler <b.cand...@pobox.com> wrote:
Stuart Clarke wrote:
> I have done some Googling and have yet to find a solution to a problem I
> have. I am trying to decode a Windows filetime value e.g. LoTime,HiTime.
> These values are commonly found in the registry and I have yet to find a
> library in Ruby to deal with them and convert them to a valid date?
> Any suggestions?
Google "ruby windows timestamp" (without the quotes)
To be a useful error report, you must post the *exact* exception message
you saw.
Apologies, I meant to copy it in. Please see below.
C:/Ruby191/lib/ruby/1.9.1/win32/registry.rb:515:in `at': bignum too big
to convert into `long' (RangeError)
from C:/Ruby191/lib/ruby/1.9.1/win32/registry.rb:515:in `wtime2time'
from test.rb:3:in `<main>'