Skip to content
Permalink
Browse files

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 Apr 20, 2011
1 parent 877c874 commit 50ec7e6fdf0866671d0cbf7fda1e58e6eaf18e9b
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/view/helpers/form.php
@@ -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') {

0 comments on commit 50ec7e6

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.