in reply to Re^3: Is this logic correct? Maybe can be rewritten better?
in thread Is this logic correct? Maybe can be rewritten better?

So how can i write the following lines iwth the use of strptime:
my @months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', +'Sep', 'Oct', 'Nov', 'Dec'); my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = loc +altime; my $date = "$mday $months[$mon], $hour:$min";
I didnt understand cpans explanation on this.

Replies are listed 'Best First'.
Re^5: Is this logic correct? Maybe can be rewritten better?
by Fletch (Bishop) on Apr 29, 2005 at 17:13 UTC

    See your OS' documentation, as it'll have all the escape codes (man 3 strftime or some variation thereon should find it). In this particular case you probably want strftime( "%d %b, %H:%M", localtime ).