2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Bug where 12pm shows up as 12am fixed.

Also made 00am show up as 12am
This commit is contained in:
azammitdcarf
2009-03-05 00:06:03 +00:00
parent b294830a69
commit 4b76c33c56

View File

@@ -109,7 +109,11 @@ function convert_time($time)
$m = substr($time,3,2);
$s = intval(substr($time,5,2));
if ($h > 12)
if ($h == 12)
return "12:$m"."pm";
else if ($h == 0)
return "12:$m"."am";
else if ($h > 12)
return $h - 12 . ":$m"."pm";
else
return $h . ":$m"."am";