my @day_name = ("Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."); my ($sec,$min,$hour,$mday,$mon,$year,$wday); ($sec,$min,$hour,$mday,$mon,$year,$wday,undef,undef)=localtime(time()); $year+=1900;$mon++; $report_date=sprintf("%s %04d.%02d.%02d %02d:%02d",$day_name[$wday],$year,$mon,$mday,$hour,$min);
You need to create an account or log in to post comments to this site.
?? After all, the POSIX module is included with the base Perl distribution, no sense in doing all this work yourself when strftime() will do it for you.