mitsuhiko/babel — pull request #102 by afedotov89 (2014-07-04 10:30:55+00:00)
Title: Fix of losses of significant zeros in DateTimeFormat.format_frac_seconds()

Examples:

>>> dates.format_datetime(datetime.datetime(2014, 7, 4, 14, 16, 13, 1), 'HH:mm:ss.SSS')
u'14:16:13.100'
>>> dates.format_datetime(datetime.datetime(2014, 7, 4, 14, 16, 13, 100000), 'HH:mm:ss.SSS')
u'14:16:13.100'

And wrong rounding:

>>> dates.format_datetime(datetime.datetime(2014, 7, 4, 14, 16, 13, 999999), 'HH:mm:ss.SSS')
u'14:16:13.1000'
instead of u'14:16:14.000'

Wrong rounding error is difficult for fix because of every time unit (hours, seconds, frac seconds, ...) format separately. So we truncate microseconds instead of rounding ones.