Tuesday, 9 August 2011

Set Date for a Logfile

sub SetDate

{

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

$year+=1900;

$mon++;

my $CurDate = sprintf("%02d/%02d/$year %02d:%02d:%02d",$mon,$mday,$hour,$min,$sec);

return $CurDate;

}



No comments:

Post a Comment

Tweets by @sriramperumalla