helper method for format_time to use in view