SPVM::Time - Time Manipulation
use Time; # Get the current epoch time my $epoch = Time->time; # Convert a epoch time to the Time::Info object that is local time my $time_info_local = Time->localtime($epoch); # Convert a epoch time to the Time::Info object that is UTC my $time_info_utc = Time->gmtime($epoch);
Time is a module to manipulate time.
Time
static method time : long ()
Get the current epoch time.
This method is the same as time function of Linux.
time
Linux
my $epoch = Time->time;
static method localtime : Time::Info ($time : long)
Convert an epoch time to the Time::Info object that is local time.
This method is the same as localtime function of Linux.
localtime
my $time_info = Time->localtime($epoch);
static method gmtime : Time::Info ($time : long)
Convert an epoch time to the Time::Info object that is UTC.
UTC
This method is the same as gmtime function of Linux.
gmtime
my $time_info = Time->gmtime($epoch);
See Time::Local about timelocal and timegm methods.
timelocal
timegm
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.