Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a bug in the dateTime function that prevented the proper hour f…
…rom 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>
  • Loading branch information
romaimperator authored and markstory committed May 10, 2011
1 parent 877c874 commit 50ec7e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cake/libs/view/helpers/form.php
Expand Up @@ -1832,9 +1832,8 @@ function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $selected

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') {
Expand Down

0 comments on commit 50ec7e6

Please sign in to comment.