# Date modified during query building

**URL:** <https://discuss.elastic.co/t/date-modified-during-query-building/13654>\
**Category:** Elasticsearch\
**Created:** [September 17, 2013, 5:54pm UTC](https://discuss.elastic.co/t/date-modified-during-query-building/13654 "2013-09-17T17:54:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Boulaud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_boulaud/32/2094_2.png) [@Benjamin\_Boulaud](https://discuss.elastic.co/u/Benjamin_Boulaud)\
**Post date:** [September 17, 2013, 5:54pm UTC](https://discuss.elastic.co/t/date-modified-during-query-building/13654/1 "2013-09-17T17:54:28Z")

</div>

Hello everyone,

Elastic Search's JSON Parser seems to modify the date i'm passing to the  
termQuery/fieldQuery method even before i connect to my ElasticSearch  
server:

An object of type Date defined at the 13th september 2013. I check it in  
debug:  
Fri Sep 13 00:00:00 CEST 2013

I only have to do :  
QueryBuilders.termQuery(".................",myDate)  
to get in debug:  
{ "term" : { "................." : "2013-09-12T22:00:00.000Z" } }

My question is how to prevent my date to be modified here ?

I would be very happy and graceful if you would take the time to help me 🙂

Regards,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:15am UTC](https://discuss.elastic.co/t/date-modified-during-query-building/13654/2 "2017-07-06T02:15:56Z")

</div>

Closed on July 6, 2017, 2:15am UTC


