ZF-8650: Fractions of second problem

Description

I use Zend_Date to work with Timestamps of DB2. These timestamps are in text form and look like this: YYYY-MM-dd HH:mm:ss.S Parsing this format works well, but outputting it has an bug with the fractions part: leading Zeros are left out. This timestamp '2009-12-29 03:51:21.016145' gets outputted as '2009-12-29 03:51:21.16145', although the fraction presition is set to 6. I use $date->toString('YYYY-MM-dd HH:mm:ss.S') for generating the output.

Comments

Fixed with r20279.

Note that your example is also errorous. When you define milliseconds, then the number 12345 will be converted into 12 seconds and 345 milliseconds. You need to change the precision before working with other factors.