added option to format time to 24 hours