300 million years is more than enough :-)

Is there a way to get this long to deserialize automatically to a Java 7
compatible type, like java.util.Date ?
(I'm using a framework which currently has issues on JDK 8).


On Fri, Nov 20, 2015 at 9:10 PM, Evan McClain <aeroe...@gmail.com> wrote:

> On Fri, Nov 20, 2015 at 04:43:29PM -0500, David Lauzon wrote:
> >
> >    I don't see a Date data type in the spec:
> >    [1]http://avro.apache.org/docs/current/spec.html#schema_primitive
> >    I've seen some old discussions in the ML and issues suggesting to
> >    serialize it using the UNIX epoch in a long value.
> >    However, how do we store events older than 1970 like birthdate ?
> >
> > References
> >
> >    1. http://avro.apache.org/docs/current/spec.html#schema_primitive
>
> Using ms since UNIX epoch should be fine for dates earlier than 1970 since
> it
> gets stored as a signed long. Dates before 1970 will just have a negative
> value.
>
> If you are dealing with dates *really* far in the past (i.e. almost 300
> million
> years ago) you probably need to do something special.
>
> --
> Evan McClain
> https://keybase.io/aeroevan
>

Reply via email to