I think we may be able to get a consistent behavior, but we will loose the ability to write JSON queries with the timezone being implicitly the default JVM timezone. I had a look to Elasticsearch's reference documentation and could not find any mention of a way to set the default timezone. The only thing I found was a way to locally set the implicit timezone in range queries, but it would be no use for user-provided JSON queries. At most, it may be added to queries when users call ignoreFieldBridge on a QueryBuilder. Anyway, it seems to me we'd better store dates with the correct timezone, and document the fact that user-provided JSON queries should state the timezone explicitly. We can always investigate a way to parse and fix queries with no timezone, but I'm not sure it's a good idea... |