jweir / elm-iso8601

Elm library to parse and convert ISO8601 times and dates

Home Page:https://package.elm-lang.org/packages/jweir/elm-iso8601/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fromPosix returns incorrect number of seconds

tom2 opened this issue · comments

fromPosix returns an incorrect number of seconds for ms > 0 such that ms mod 1000 >= 500.

> ms = 500                                         
500 : number

> time = ISO8601.fromPosix <| Time.millisToPosix ms
{ day = 1, hour = 0, millisecond = 500, minute = 0, month = 1, offset = (0,0), second = 1, year = 1970 }
    : ISO8601.Time

> ISO8601.toPosix time                             
Posix 1500 : Time.Posix