Fixed a bug in the dateTime function that prevented the proper hour from being selected because the check for past noon required seconds to be set and they weren't

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
romaimperator 2011-04-20 15:15:30 -05:00 committed by mark_story
parent 877c874f49
commit 50ec7e6fdf

View file

@ -1832,9 +1832,8 @@ class FormHelper extends AppHelper {
if (!empty($timeFormat)) {
$time = explode(':', $days[1]);
$check = str_replace(':', '', $days[1]);
if (($check > 115959) && $timeFormat == '12') {
if (($time[0] > 12) && $timeFormat == '12') {
$time[0] = $time[0] - 12;
$meridian = 'pm';
} elseif ($time[0] == '00' && $timeFormat == '12') {