desktop-dart / duration

Utilities to make working with 'Duration's easier.
BSD 3-Clause "New" or "Revised" License
53 stars 47 forks source link

Time string with short fractional seconds is parsed incorrectly #56

Closed SilkyPants closed 2 years ago

SilkyPants commented 2 years ago

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)