SMB::Time - Functions to convert between UNIX time and SMB time
use SMB::Time qw(from_nttime to_nttime); print scalar localtime(from_nttime(1.305e+17)), "\n"; use Time::HiRes qw(time); # enhance native time(), optional print to_nttime(time), "\n";
Time values in SMB follow the NTFS time convention. This module helps to convert between NT time and UNIX time.
NT time is number of 100-nanoseconds since 1601-01-01 00:00:00 UTC.
UNIX time is number of seconds since 1970-01-01 00:00:00 UTC.
By default, functions from_nttime and to_nttime are exported using the standard Exporter mechanism.
Returns NT time (64-bit unsigned integer) given UNIX time (32-bit unsigned integer).
Returns UNIX time (32-bit unsigned integer) given NT time (64-bit unsigned integer).
Mikhael Goikhman <migo@cpan.org>
To install SMB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SMB
CPAN shell
perl -MCPAN -e shell install SMB
For more information on module installation, please visit the detailed CPAN module installation guide.