transit-erlang icon indicating copy to clipboard operation
transit-erlang copied to clipboard

Error in the Transit time encoding.

Open jlouis opened this issue 10 years ago • 3 comments

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".

jlouis avatar Aug 23 '14 15:08 jlouis

This has not been fixed. It fails for {-1, 0, 1000} as well.

jlouis avatar Aug 23 '14 20:08 jlouis

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.

jlouis avatar Sep 02 '14 13:09 jlouis

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.

isaksky avatar Nov 17 '16 23:11 isaksky