Added a function to deal with time formatting and added the option of standard time or military time.