I checked the zend code. The problem sits here:

Data.php

(line 2776 function private function _time)

$parsed = Zend_Locale_Format::getTime($time, array('date_format' => $format,
'locale' => $locale, 'format_type' => 'iso'));

you get back an array with $parsed['hour']=01 and $parsed['minute']=30 (and
some others). But not with $parsed['second']. That seems fair to me. But in
the following lines you get:

$time->set($parsed['hour'],   self::HOUR);
$time->set($parsed['minute'], self::MINUTE);
$time->set($parsed['second'], self::SECOND); => and that's where he crashes

so better would be something like this:

if($parsed['hour'])
  $time->set($parsed['hour'],   self::HOUR);
if($parsed[minute])
  $time->set($parsed[minute],   self::MINUTE);

or something like this. If not, using 'hh:mm' has no use (IMHO)

-----
visit my website at  http://www.phpscriptor.com/ http://www.phpscriptor.com/ 
-- 
View this message in context: 
http://www.nabble.com/zend_date-settime-question-tp21317298p21320361.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to