I use the strftime function from the POSIX package for that - its only task is to give the output of localtime (and its siblings) a readable format:
perl -MPOSIX=strftime -e "print strftime '%Y-%m-%d %H:%M:%S',localtime +;" 2006-07-18 16:02:08
In reply to Re: golfing on localtime
by Corion
in thread golfing on localtime
by ForgotPasswordAgain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |