rtfeldman / elm-iso8601-date-strings

Convert between ISO-8601 date strings and Time.Posix
https://package.elm-lang.org/packages/rtfeldman/elm-iso8601-date-strings/latest
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Support variable milliseconds precision #10

Closed w0rm closed 5 years ago

w0rm commented 5 years ago

I'm really sorry for the other PR. It seems like the Go backend is fuzz testing the Elm frontend, and I got a value in which the fraction is not rounded to milli-, micro- or nanoseconds: 2018-09-01T20:46:47.23833Z.

The solution I came up with is maybe less elegant. I extract fractions into a float and then convert it to integer milliseconds.

rtfeldman commented 5 years ago

Gotcha, makes sense! That seems like a fine solution to me.

rtfeldman commented 5 years ago

Published as 1.1.2.

w0rm commented 5 years ago

@rtfeldman thanks for the prompt merge! I finally managed to upgrade Alertmanager https://github.com/prometheus/alertmanager/pull/1539