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
  • Loading branch information...
1 parent 33afe21 commit 2b4f14ab4a07345005490f2abbb0ab5253a5c404 @romaimperator committed Apr 20, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/view/helpers/form.php
@@ -1826,9 +1826,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 2b4f14a

Please sign in to comment.