[hibernate-dev] HSEARCH Java 8 Date Time
Hardy Ferentschik
hardy at hibernate.org
Mon Aug 10 08:20:53 EDT 2015
On Mon, Aug 10, 2015 at 12:34:33PM +0100, Davide D'Alto wrote:
> I'm not sure there is an easy way to convert Instant and DateTime to a
> numeric value.
> The problem is that the resolution for temporal types is nanoseconds, the
> following datetime is valid:
>
> year: -999.999.999
> month: 12
> day: 31
> hour: 23
> minute: 59
> second: 59
> nanos: 999.999.999
>
> It gets more complicated when we need to store Offset or time zone.
Why not just call Instant#toEpochMilli. I thought we agreed that for instant
based time we stick to epoch time. There might be a loss in resolution, but
I think this is fine in our case.
--Hardy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20150810/b5ccbb17/attachment-0001.bin
More information about the hibernate-dev
mailing list