SPVM::Time::Local - Reverse Manipulation of localtime and gmtime Functions.
use Time use Time::Local; my $epoch = Time->time; my $time_info_local = Time->localtime($epoch); my $time_info_utc = Time->gmtime($epoch); # Convert a Time::Info object that is local time to the epoch time my $epoch = Time::Local->timelocal($time_info_local); # Convert a Time::Info object that is UTC to the epoch time my $epoch = Time::Local->timegm($time_info_utc);
Time::Local provides reverse manipulations of localtime and gmtime functions.
Time::Local
This module is a SPVM class.
Time::Local is a SPVM class. SPVM itself is yet experimental status.
static method timelocal : long ($time_info : Time::Info)
Convert a Time::Info object that is local time to the epoch time.
This method is the reverse manipulation of localtime.
This method is the same as timelocal function of Linux.
timelocal
Linux
my $epoch = Time::Local->timelocal($time_info_local);
static method timegm : long ($time_info : Time::Info)
Convert a Time::Info object that is UTC to the epoch time.
UTC
This method is the reverse manipulation of gmtime.
This method is the same as timegm function of Linux.
timegm
my $epoch = Time::Local->timegm($time_info_utc);
https://github.com/yuki-kimoto/SPVM-Time-Local
Yuki Kimoto kimoto.yuki@gmail.com
kimoto.yuki@gmail.com
Copyright 2022-2022 Yuki Kimoto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SPVM::Time::Local, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Time::Local
CPAN shell
perl -MCPAN -e shell install SPVM::Time::Local
For more information on module installation, please visit the detailed CPAN module installation guide.