[bv-dev] Proposal for supporting new Java 8 date/time types

Hardy Ferentschik hardy at hibernate.org
Mon Oct 10 09:12:55 EDT 2016

Hi there,

I finally found some time to look at some of the BV 2.0 proposals. 

On Fri, 23-Sep-2016 17:08, Michael Nascimento wrote:
> Hi guys,
> I was finally able to write something before taking my flight this
> morning. Let me know what you think:
> https://github.com/sjmisterm/beanvalidation.org/blob/760cd54cb1f00bac1ae88d749d01cf80fe79f899/proposals/BVAL-496.adoc

So what would be the difference to the TimeProvider which is currently supported as a Hibernate Validator specific
extension. Very similar, right? I see how one can use it to use the suggested API to determine the time zone
for the creation of the 'now' instance. 

How does this solve so the problem of determining the time zone of say a LocalDate at time of validation.
Say the LocalDate is generated on a client and send to a server where validation occurs. Any time zone from the client
side is lost. Is the assumption in this proposition that the time zone of the server is used? I don't think this would
be correct (at least not in all cases).

I guess a simple solution would be to define in the spec that date/time types which are not an instant in time will
always use a fixed time zone (eg UTC) for comparison. This would most likely also lead to some confusing border cases
for users, but it would be deterministic.


-------------- 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/beanvalidation-dev/attachments/20161010/c984fd68/attachment.bin 

More information about the beanvalidation-dev mailing list