erikcook
asked on
Military or standard time?
$time = $today['hours'].":".$today ['minutes' ];
Will this read in military time or standard time? If standard, how do I add Post/Anti Meridian? AM/PM
Will this read in military time or standard time? If standard, how do I add Post/Anti Meridian? AM/PM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if this is your code
$today = getdate();
$time = $today['hours'].":".$today ['minutes' ];
then you get 'standard time'.
$today = getdate();
$time = $today['hours'].":".$today
then you get 'standard time'.
From manual: "hours" - Numeric representation of hours - 0 to 23
24 hour - military time
24 hour - military time
$time = date("H:i");
echo $time; //24 hour eg. 23:11
$time = date("h:i a");
echo $time; //12 hour eg. 11:11 pm
see: http://us2.php.net/manual/en/function.date.php