Originally posted as a Categorized Question.
In reply to How can I format the output of localtime? by Anonymous Monk