", $time); if ($format == "24to12") { // 24 to 12 hr convert $fmt = ($has_seconds ? "g:i:s A" : "g:i A"); } elseif ($format == "12to24") { // 12 to 24 hr convert $fmt = ($has_seconds ? "H:i:s" : "H:i"); } else { $fmt = ""; } return date($fmt, strtotime($time)); } ?>

Skip to content