mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
877c874f49
commit
50ec7e6fdf
1 changed files with 1 additions and 2 deletions
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue