Added 12/24H time detection

Added an if statement to determine formatting between 12/24 based on user selection in preferences.