-
-
23 Jun 2022 00:46:28 UTC
- Distribution: SPVM
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (12)
- Testers (57 / 1 / 1)
- Kwalitee
Bus factor: 1- 81.06% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (863.45KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- ExtUtils::CBuilder
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
SPVM::Time - Time Manipulation
SYNOPSYS
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);
DESCRIPTION
Time
is a module to manipulate time.Class Methods
time
static method time : long ()
Get the current epoch time.
This method is the same as
time
function ofLinux
.my $epoch = Time->time;
localtime
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 ofLinux
.my $time_info = Time->localtime($epoch);
gmtime
static method gmtime : Time::Info ($time : long)
Convert an epoch time to the Time::Info object that is
UTC
.This method is the same as
gmtime
function ofLinux
.my $time_info = Time->gmtime($epoch);
See Also
See Time::Local about
timelocal
andtimegm
methods.Module Install Instructions
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm SPVM
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.