Convert unix time (or epoch) to formated date string

Works for me. What is the problem?