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/760cd54cb1f00bac1ae8...
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.
--Hardy
--Hardy