To all,
Have another question regarding to gmtime and timelocal. Is there any limitation on the year we input ?
for below code :
use Time::Local;
$month -= 1;
$unix_time = timelocal($sec,$minute,$hour,$date,$month,$year);
i found that the $year cannot be more than 2038, else it will cause an error :
Day too big - 24868 > 24855
sec too small - 24868 < 28800
What is that error mean ?? is that mean the year we input cannot be too far ? Is this the limitation of "localtime" ? anybody can clear my doubt ??
same as below :
print "\nPlease enter unix time stamp\n";
chomp($unix_stmp = <STDIN>);
$unix_stmpGmt8 = $unix_stmp + 8 * 60 * 60;
use Time::Local;
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($unix_stmpGmt8);
if the unix time is too big ( i use >2500 ), it cant get answer. Is this another limitation for command "gmtime" ?
Thanks if can clear my doubt
Have another question regarding to gmtime and timelocal. Is there any limitation on the year we input ?
for below code :
use Time::Local;
$month -= 1;
$unix_time = timelocal($sec,$minute,$hour,$date,$month,$year);
i found that the $year cannot be more than 2038, else it will cause an error :
Day too big - 24868 > 24855
sec too small - 24868 < 28800
What is that error mean ?? is that mean the year we input cannot be too far ? Is this the limitation of "localtime" ? anybody can clear my doubt ??
same as below :
print "\nPlease enter unix time stamp\n";
chomp($unix_stmp = <STDIN>);
$unix_stmpGmt8 = $unix_stmp + 8 * 60 * 60;
use Time::Local;
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($unix_stmpGmt8);
if the unix time is too big ( i use >2500 ), it cant get answer. Is this another limitation for command "gmtime" ?
Thanks if can clear my doubt