Anyone else notice that Noon shows up as 12:00 AM when you are on the 12-hour format instead of 12:00 PM?

Comments

mnapier’s picture

Also 12 midnight displays as 24:00 when in 12-hour mode.

mnapier’s picture

I fixed the display portion of this by changing the convert_to_ampm function to this; (probably not the cleanest way to obtain the final result)

/**
 * Helper function for conversion of clock format.
 */
function convert_to_ampm($hour) {
  list($hr, $min)= explode(":",$hour);
  if ($hr>=12 && $hr<24) {
  	if ($hr == 12 ) {}
  	else {
  		$hr= $hr-12;
  	}
    $ampm= ' PM';
  }
  else {
  	if ($hr == 24) {
  		$hr = $hr-12;
  	}
    $ampm=' AM';
  }
return $hr.':'.$min.$ampm ;
}

Still working on making Noon show up as 12:00 PM in the drop down menu's.

Ozeuss’s picture

Are you using the latest version? I don't see this in mine.

Ozeuss’s picture

Status: Active » Closed (fixed)