Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 50ec7e6fdf0866671d0cbf7fda1e58e6eaf18e9b 1 parent 877c874
@romaimperator romaimperator authored markstory committed
Showing with 1 addition and 2 deletions.
  1. +1 −2  cake/libs/view/helpers/form.php
View
3  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') {
Please sign in to comment.
Something went wrong with that request. Please try again.