From b3640356f320e9dedcab94a8697c7332c77dcaa7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 14 Jan 2007 03:14:11 +0000 Subject: [PATCH] "fix for bug #282, hour and minute < 10 were not selected" --- etemplate/inc/class.date_widget.inc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index 5b90c73f6b..b192816650 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -124,11 +124,11 @@ { switch($mdy[$n]) { - case 'Y': $value['Y'] = $dat; break; - case 'm': $value['m'] = $dat; break; - case 'd': $value['d'] = $dat; break; - case 'H': $value['H'] = $dat; break; - case 'i': $value['i'] = $dat; break; + case 'Y': $value['Y'] = (int) $dat; break; + case 'm': $value['m'] = (int) $dat; break; + case 'd': $value['d'] = (int) $dat; break; + case 'H': $value['H'] = (int) $dat; break; + case 'i': $value['i'] = (int) $dat; break; } } } @@ -138,12 +138,12 @@ if (substr($type,-4) == 'only') $value -= adodb_date('Z',0); $value = array( - 'Y' => adodb_date('Y',$value), - 'm' => adodb_date('m',$value), + 'Y' => (int) adodb_date('Y',$value), + 'm' => (int) adodb_date('m',$value), 'M' => substr(lang(adodb_date('F',$value)),0,3), - 'd' => adodb_date('d',$value), - 'H' => adodb_date('H',$value), - 'i' => adodb_date('i',$value) + 'd' => (int) adodb_date('d',$value), + 'H' => (int) adodb_date('H',$value), + 'i' => (int) adodb_date('i',$value) ); } $time_0h0 = !(int)$value['H'] && !(int)$value['i'];