Click here to get back home

Time::Local - month problem

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Time::Local - month problem Dave Saville 12-15-2004
Posted by Dave Saville on December 15, 2004, 11:28 am
Please log in for more thread options
Perl 5.8.0 om Solaris 8

print "$file $sec $min $hour $mday $mon $yearn";
my $age = time - Time::Local->timegm($sec, $min, $hour, $mday, $mon,
$year);
print ">$agen";


CSHRC 0 0 0 16 11 2003
Month '16' out of range 0..11 at ftp2.pl line 44

Looking at timegm he does

sub timegm {
my ($sec,$min,$hour,$mday,$month,$year) = @_;

adding
print @_;
print "n";

after this yields:

CSHRC 0 0 0 16 11 2003
Time::Local00016112003 <==================
Month '16' out of range 0..11 at ftp2.pl line 44

Anyone?

--

Regards

Dave Saville

NB Remove no-spam- for good email address




Posted by igor.lobanov@gmail.com on December 15, 2004, 3:37 am
Please log in for more thread options
Time::Local->timegm(arglist)
equal to
timegm('Time::Local',arglist)

lio
http://www.template-toolkit.ru



Posted by Dave Saville on December 15, 2004, 12:26 pm
Please log in for more thread options
On 15 Dec 2004 02:37:20 -0800, igor.lobanov@gmail.com wrote:

>
>
>Time::Local->timegm(arglist)
>equal to
>timegm('Time::Local',arglist)
>
>lio
>http://www.template-toolkit.ru
>

Thanks a bunch, I knew it was me :-)

--

Regards

Dave Saville

NB Remove no-spam- for good email address




Posted by lio on December 15, 2004, 3:45 am
Please log in for more thread options
Time::Local->timegm(arglist)
equal to
timegm('Time::Local',arglist)

--
lio
http://www.template-toolkit.ru



Posted by chaoslawful on December 20, 2004, 2:26 pm
Please log in for more thread options
Dave Saville wrote:
> Perl 5.8.0 om Solaris 8
>
> print "$file $sec $min $hour $mday $mon $yearn";
> my $age = time - Time::Local->timegm($sec, $min, $hour, $mday, $mon,
> $year);
This form is incorrect. It actually operate as
timegm("Time::Local",$sec,$min,$hour,$mday,$mon,$year),
so $mday is at the position of Month. You should call timegm()
as "Time::Local::timegm(...)"
> print ">$agen";
>
>
> CSHRC 0 0 0 16 11 2003
> Month '16' out of range 0..11 at ftp2.pl line 44
>
> Looking at timegm he does
>
> sub timegm {
> my ($sec,$min,$hour,$mday,$month,$year) = @_;
>
> adding
> print @_;
> print "n";
>
> after this yields:
>
> CSHRC 0 0 0 16 11 2003
> Time::Local00016112003 <==================
> Month '16' out of range 0..11 at ftp2.pl line 44
>
> Anyone?
>
> --
>
> Regards
>
> Dave Saville
>
> NB Remove no-spam- for good email address
>
>


Similar ThreadsPosted
Time::Local V 1.10 and users thereof, eg Archive::Zip V 1.14 November 5, 2004, 10:09 am
The Month in Perl Software Design: Review of January 2005 February 10, 2005, 10:39 pm
Net::FTP error when local file does not exist September 23, 2004, 7:55 am
Local installation of perl module September 5, 2005, 9:07 am
How do I keep subroutines Local to the libraries I am calling? October 16, 2006, 11:05 am
Installing Catalyst under local::lib on DreamHost October 15, 2008, 2:15 am
Local install of modules - no root; no telnet November 9, 2004, 12:54 am
CPAN module local installation question July 12, 2006, 4:49 am
Search HTML documentation of local modules August 10, 2006, 3:16 pm
Module to return Local Policy Info July 13, 2008, 1:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap