Hy, use Zend_Measure_Time by suppressing values below 1.
$hours = $time->convert($input, Zend_Measure_Time::HOUR); $input -= $hours*3600; $minutes = $time->convert($input, Zend_Measure_Time::MINUTES); $input -= $minutes * 60; $seconds = $time->convert($input, Zend_Measure_Time::SECONDS); print($hours . ':' . $minutes . ':' . $seconds); Still for such an easy task I would do it manually. Greetings Thomas -----Ursprüngliche Nachricht----- Von: Fernando Marcelo [mailto:[email protected]] Gesendet: Dienstag, 12. April 2011 16:33 An: Zend Framework Betreff: [fw-general] Handling time measures Hi, I have a time measure ( originally in seconds ) and i want to convert it to HH:mm:ss format. Zend_Date does not seem like a good solution for me as i will eventually have times with more than 24 hours. Zend_Measure_Time will convert to only one unit ( hours, minutes etc. ) but not in the format that i want. My question is if there is a way do this without having to extend Zend_Measure_Time? Any other component that have this feature? Thanks, Fernando Morgenstern [email protected] -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected] -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
