iphone has asked for the wisdom of the Perl Monks concerning the following question:
Currently I am getting the system timeusing the below code which gives time as "392011",I want the time as "030911",Can anyone suggest how can I achieve that?
my ($sec,$min,$hour,$day,$mon,$yr19,@rest) = localtime(time);####### +To get the localtime of your system my $month =$mon +1; my $year =$yr19+1900; print "$month$day$year\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting system time in a specific format
by GrandFather (Saint) on Mar 10, 2011 at 03:27 UTC | |
| |
|
Re: Getting system time in a specific format
by ikegami (Patriarch) on Mar 10, 2011 at 05:08 UTC | |
|
Re: Getting system time in a specific format
by Anonymous Monk on Mar 10, 2011 at 03:22 UTC |