Mail::Exchange::Time - time object to convert between unix time and MS time
use Mail::Exchange::Time; my $now=Mail::Exchange::Time->new($unixtime); my $now=Mail::Exchange::Time->from_mstime($mstime); print $now->unixtime; print $now->mstime; use Mail::Exchange::Time qw(mstime_to_unixtime unixtime_to_mstime); print mstime_to_unixtime($mstime); print unixtime_to_mstime($unixtime);
A Mail::Exchange::Time object allows you to convert between unix time and the time used internally in by Microsoft, which is defined as number of 100-nsec-intervals since Jan 01, 1901.
$now=Mail::Exchange::Time->new(time())
Creates a time object from unix time.
$now=Mail::Exchange::Time->from_mstime(129918359788540682)
$unixtime=$now->unixtime()
Returns the unix time from a time object.
$mstime=$now->mstime()
Returns the Microsoft time from a time object.
use Mail::Exchange::Time qw(mstime_to_unixtime) $unixtime=mstime_to_unixtime(129918359788540682)
Converts a microsoft time to unix format.
use Mail::Exchange::Time qw(unixtime_to_mstime) $mstime=unixtime_to_mstime(time())
Converts a unix time to microsoft format.
To install Mail::Exchange::CRC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Exchange::CRC
CPAN shell
perl -MCPAN -e shell install Mail::Exchange::CRC
For more information on module installation, please visit the detailed CPAN module installation guide.