CG_man has asked for the wisdom of the Perl Monks concerning the following question:
I appreciate any help on this. Not sure if I can do what I want using localtime.sub GETTIME { if ($_[0] eq "999999999") { $time = ("******** **********"); } elsif ($_[0] eq "0") { $time = ("******** **********"); } else { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( +$_[0]); $mon++; $time = sprintf ("%.2d:%.2d:%.2d %.2d/%.2d/%.2d", $hour, $min, $se +c, $mon, $mday, $year + 1900);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I convert localtime to display 12 hr time instead of 24 hr time
by ikegami (Patriarch) on Nov 14, 2008 at 04:03 UTC | |
by CG_man (Novice) on Nov 14, 2008 at 04:11 UTC | |
|
Re: How do I convert localtime to display 12 hr time instead of 24 hr time
by eighty-one (Curate) on Nov 14, 2008 at 04:09 UTC | |
|
Re: How do I convert localtime to display 12 hr time instead of 24 hr time
by ysth (Canon) on Nov 14, 2008 at 08:24 UTC |