transit-erlang
transit-erlang copied to clipboard
Error in the Transit time encoding.
Generating {transit_datetime,{0,0,1000}}
fails the isomorphism test. It is encoded as a quoted "~m0" but this is obviously wrong since it is one millisecond in. So the right encoding is "~m1".
This has not been fixed. It fails for {-1, 0, 1000}
as well.
Investigated this one some more. It has to do with negative values in general and the way we map these into the Erlang time tuple. Also, it is not clear entirely how points in the past is to be handled by the Erlang time module.
Have you considered just not trying to convert it? This would arguably be better, because then users can do it themselves if they have a working way to do it.