NAME
Mail::Exchange::Time - time object to convert between unix time and MS time
SYNOPSIS
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);
DESCRIPTION
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.
new()
$now=Mail::Exchange::Time->new(time())
Creates a time object from unix time.
from_mstime()
$now=Mail::Exchange::Time->from_mstime(129918359788540682)
Creates a time object from unix time.
unixtime()
$unixtime=$now->unixtime()
Returns the unix time from a time object.
mstime()
$mstime=$now->mstime()
Returns the Microsoft time from a time object.
mstime_to_unixtime()
use Mail::Exchange::Time qw(mstime_to_unixtime)
$unixtime=mstime_to_unixtime(129918359788540682)
Converts a microsoft time to unix format.
unixtime_to_mstime()
use Mail::Exchange::Time qw(unixtime_to_mstime)
$mstime=unixtime_to_mstime(time())
Converts a unix time to microsoft format.