IsAmPmMode ()
The function is used to set and print 12-hour time format. Returns true on success.
if (IsAmPmMode()) { echo date("g:i a"); } else { echo date("H:i"); }