A
Alexandre Jaquet
Hi again, I can't understand why when I do the following code :
sub getTime {
my $date = new Class:ate ();
$Class:ate:ATE_FORMAT="%H%M%S%X%Y";
warn "date hour test ->".now;
$date = now;
return $date;
}
I got the following output :
date hour test ->12033612:03:362005
I'm trying to get 12:03:362005
My second question is why when I calculate the difference between two
dates I only got the difference :
sub differenceBetweenHour {
my $time_start = shift || '';
my $time_end = shift || '';
$Class:ate:ATE_FORMAT="%H%M%S%X%Y";
my $result = $time_end - $time_start;
warn "test minus $result";
return $result;
}
I got : test minus 1 (it doesn't calculte difference between miilisecond)
thx
sub getTime {
my $date = new Class:ate ();
$Class:ate:ATE_FORMAT="%H%M%S%X%Y";
warn "date hour test ->".now;
$date = now;
return $date;
}
I got the following output :
date hour test ->12033612:03:362005
I'm trying to get 12:03:362005
My second question is why when I calculate the difference between two
dates I only got the difference :
sub differenceBetweenHour {
my $time_start = shift || '';
my $time_end = shift || '';
$Class:ate:ATE_FORMAT="%H%M%S%X%Y";
my $result = $time_end - $time_start;
warn "test minus $result";
return $result;
}
I got : test minus 1 (it doesn't calculte difference between miilisecond)
thx