desktop-dart/duration

Time string with short fractional seconds is parsed incorrectly

SilkyPants opened this issue · 0 comments

Given a string such as 245:09:08.12, the resulting duration parsed returns with milliseconds of 0 and microseconds of 12 which is incorrect. The resulting duration should return with a millisecond of 120 with no microseconds.

Code:

parseTime('245:09:08.12').toString()

Expected:

Duration (245:09:08.120000)

Actual:

Duration (245:09:08.000012)