NAME
SMB::Time - Functions to convert between UNIX time and SMB time
SYNOPSIS
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";
ABSTRACT
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.
EXPORTED FUNCTIONS
By default, functions from_nttime and to_nttime are exported using the standard Exporter mechanism.
- from_nttime NTTIME
-
Returns NT time (64-bit unsigned integer) given UNIX time (32-bit unsigned integer).
- to_nttime UNIXTIME
-
Returns UNIX time (32-bit unsigned integer) given NT time (64-bit unsigned integer).
AUTHOR
Mikhael Goikhman <migo@cpan.org>