The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DateTime::Format::WindowsFileTime - make a nice DateTime object from the "Windows File Time" hex string.

SYNOPSIS

  use DateTime::Format::WindowsFileTime;
  my $dt = DateTime::Format::WindowsFileTime->parse_datetime( '01C4FA8464623000' );
  # $dt is a regular DateTime object
  print "$dt\n";  # yields '2005-01-15T03:00:00'

DESCRIPTION

Converts a Windows FILETIME into a DateTime object. The Windows FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601.

EXPORT

None by default.

METHODS

parse_datetime

Is called as a class method (use the arrow) and takes a string representing the windows filetime hex value as it's sole argument. Returns a DateTime object.

Note: don't pass it a hex number in perl (eg. 0x01c4fa8464623000). Just a string.

SEE ALSO

DateTime

THANKS

Doug wrote the guts to the method, Jim just surrounded it with what h2xs pukes out, and published it.

Thanks to Robert A. Lerche for finding a bug and recommending the fix.

AUTHOR

Jim, <jg.perl@thegarvin.com>, Doug, <df.cpan@feuerbach.net>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Jim

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.