# Elastic Search river date pattern

**URL:** <https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083>\
**Category:** Elasticsearch\
**Created:** [April 3, 2015, 12:47pm UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083 "2015-04-03T12:47:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)\
**Post date:** [April 3, 2015, 12:47pm UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/1 "2015-04-03T12:47:55Z")

</div>

Hi All,

I have important scenario to share with you regarding mysql river.

I created index it contains date field no format was specified.

the following is the mapping :

```
"created" :{

```

"type" : "date",  
"format" : "dateOptionalTime"  
}  
when I index data using river the date is inserting in the following  
format : "2015-03-06T18:04:15.000-06:00" automatically.  
due to this I am getting my daily record counts. but if the date format is  
2015-03-06T18:04:15.000Z like this it is working fine and showing  
daily counts fine  
But from database my date is coming like this '2015-03-01 00:00:00' So how  
can we control the date from river while indexing in to elasticsearch  
which should be display in 2015-03-06T18:04:15.000Z format.  
please suggest me on this due to this my monthly sales also not showing  
correctly.is there any custom date format need to define when data is  
populating  
using river from database.  
why "-06:00" this is appending at the end of each date please explain me  
this concept?please help me in this

Thanks  
phani

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 3, 2015, 2:43pm UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/2 "2015-04-03T14:43:53Z")

</div>

Do you run MySQL and ES in different timezones?

Jörg

On Fri, Apr 3, 2015 at 2:47 PM, [phani.nadiminti@goktree.com](mailto:phani.nadiminti@goktree.com) wrote:

> Hi All,
> 
> I have important scenario to share with you regarding mysql river.
> 
> I created index it contains date field no format was specified.
> 
> the following is the mapping :
> 
> ```
> "created" :{
> 
> ```
> 
> "type" : "date",  
> "format" : "dateOptionalTime"  
> }  
> when I index data using river the date is inserting in the following  
> format : "2015-03-06T18:04:15.000-06:00" automatically.  
> due to this I am getting my daily record counts. but if the date format  
> is 2015-03-06T18:04:15.000Z like this it is working fine and showing  
> daily counts fine  
> But from database my date is coming like this '2015-03-01 00:00:00' So  
> how can we control the date from river while indexing in to elasticsearch  
> which should be display in 2015-03-06T18:04:15.000Z format.  
> please suggest me on this due to this my monthly sales also not showing  
> correctly.is there any custom date format need to define when data is  
> populating  
> using river from database.  
> why "-06:00" this is appending at the end of each date please explain me  
> this concept?please help me in this
> 
> Thanks  
> phani
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH1dsaJ40e0T%3D0d7rssCc5SzR9eXwaUz1KvGsurpkXf1A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH1dsaJ40e0T%3D0d7rssCc5SzR9eXwaUz1KvGsurpkXf1A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)\
**Post date:** [April 6, 2015, 5:13am UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/3 "2015-04-06T05:13:00Z")

</div>

Hi Jorg,

```
  yes mysql and es servers are running in different timezones.

  mysql running in PST timezone where as es servers running on CDT 

```

timezone.

Thanks  
phani

On Friday, April 3, 2015 at 8:14:00 PM UTC+5:30, Jörg Prante wrote:

> Do you run MySQL and ES in different timezones?
> 
> Jörg
> 
> On Fri, Apr 3, 2015 at 2:47 PM, \<[phani.n...@goktree.com](mailto:phani.n...@goktree.com) \<javascript:\>\>  
> wrote:
> 
> > Hi All,
> > 
> > I have important scenario to share with you regarding mysql river.
> > 
> > I created index it contains date field no format was specified.
> > 
> > the following is the mapping :
> > 
> > ```
> > "created" :{
> > 
> > ```
> > 
> > "type" : "date",  
> > "format" : "dateOptionalTime"  
> > }  
> > when I index data using river the date is inserting in the following  
> > format : "2015-03-06T18:04:15.000-06:00" automatically.  
> > due to this I am getting my daily record counts. but if the date format  
> > is 2015-03-06T18:04:15.000Z like this it is working fine and showing  
> > daily counts fine  
> > But from database my date is coming like this '2015-03-01 00:00:00' So  
> > how can we control the date from river while indexing in to elasticsearch  
> > which should be display in 2015-03-06T18:04:15.000Z format.  
> > please suggest me on this due to this my monthly sales also not showing  
> > correctly.is there any custom date format need to define when data is  
> > populating  
> > using river from database.  
> > why "-06:00" this is appending at the end of each date please explain  
> > me this concept?please help me in this
> > 
> > Thanks  
> > phani
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 6, 2015, 8:18am UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/4 "2015-04-06T08:18:45Z")

</div>

With the "timezone" parameter, you can adjust the timezone used by JDBC  
plugin in accordance to the timezone of the DB it connects to.

E.g. for PST

"timezone" : "America/Los Angeles"

Jörg

On Mon, Apr 6, 2015 at 7:13 AM, [phani.nadiminti@goktree.com](mailto:phani.nadiminti@goktree.com) wrote:

> Hi Jorg,
> 
> ```
> yes mysql and es servers are running in different timezones.
> 
> mysql running in PST timezone where as es servers running on CDT
> 
> ```
> 
> timezone.
> 
> Thanks  
> phani
> 
> On Friday, April 3, 2015 at 8:14:00 PM UTC+5:30, Jörg Prante wrote:
> 
> > Do you run MySQL and ES in different timezones?
> > 
> > Jörg
> > 
> > On Fri, Apr 3, 2015 at 2:47 PM, [phani.n...@goktree.com](mailto:phani.n...@goktree.com) wrote:
> > 
> > > Hi All,
> > > 
> > > I have important scenario to share with you regarding mysql river.
> > > 
> > > I created index it contains date field no format was specified.
> > > 
> > > the following is the mapping :
> > > 
> > > ```
> > > "created" :{
> > > 
> > > ```
> > > 
> > > "type" : "date",  
> > > "format" : "dateOptionalTime"  
> > > }  
> > > when I index data using river the date is inserting in the following  
> > > format : "2015-03-06T18:04:15.000-06:00" automatically.  
> > > due to this I am getting my daily record counts. but if the date  
> > > format is 2015-03-06T18:04:15.000Z like this it is working fine and showing  
> > > daily counts fine  
> > > But from database my date is coming like this '2015-03-01 00:00:00' So  
> > > how can we control the date from river while indexing in to elasticsearch  
> > > which should be display in 2015-03-06T18:04:15.000Z format.  
> > > please suggest me on this due to this my monthly sales also not  
> > > showing correctly.is there any custom date format need to define when  
> > > data is populating  
> > > using river from database.  
> > > why "-06:00" this is appending at the end of each date please explain  
> > > me this concept?please help me in this
> > > 
> > > Thanks  
> > > phani
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEDeAtJTc\_XGSmBaMKwA9%3D67P7%3DtBu3sQdzVnWupC1%2BJg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEDeAtJTc_XGSmBaMKwA9%3D67P7%3DtBu3sQdzVnWupC1%2BJg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)\
**Post date:** [April 6, 2015, 10:37am UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/5 "2015-04-06T10:37:40Z")

</div>

Hi Jorg,

Thank you for your support it got worked now my monthly record counts are  
showing fine....

Thanks  
Jorg.

On Monday, April 6, 2015 at 1:48:50 PM UTC+5:30, Jörg Prante wrote:

> With the "timezone" parameter, you can adjust the timezone used by JDBC  
> plugin in accordance to the timezone of the DB it connects to.
> 
> E.g. for PST
> 
> "timezone" : "America/Los Angeles"
> 
> Jörg
> 
> On Mon, Apr 6, 2015 at 7:13 AM, \<[phani.n...@goktree.com](mailto:phani.n...@goktree.com) \<javascript:\>\>  
> wrote:
> 
> > Hi Jorg,
> > 
> > ```
> > yes mysql and es servers are running in different timezones.
> > 
> > mysql running in PST timezone where as es servers running on CDT 
> > 
> > ```
> > 
> > timezone.
> > 
> > Thanks  
> > phani
> > 
> > On Friday, April 3, 2015 at 8:14:00 PM UTC+5:30, Jörg Prante wrote:
> > 
> > > Do you run MySQL and ES in different timezones?
> > > 
> > > Jörg
> > > 
> > > On Fri, Apr 3, 2015 at 2:47 PM, [phani.n...@goktree.com](mailto:phani.n...@goktree.com) wrote:
> > > 
> > > > Hi All,
> > > > 
> > > > I have important scenario to share with you regarding mysql river.
> > > > 
> > > > I created index it contains date field no format was specified.
> > > > 
> > > > the following is the mapping :
> > > > 
> > > > ```
> > > > "created" :{
> > > > 
> > > > ```
> > > > 
> > > > "type" : "date",  
> > > > "format" : "dateOptionalTime"  
> > > > }  
> > > > when I index data using river the date is inserting in the following  
> > > > format : "2015-03-06T18:04:15.000-06:00" automatically.  
> > > > due to this I am getting my daily record counts. but if the date  
> > > > format is 2015-03-06T18:04:15.000Z like this it is working fine and showing  
> > > > daily counts fine  
> > > > But from database my date is coming like this '2015-03-01 00:00:00'  
> > > > So how can we control the date from river while indexing in to elasticsearch  
> > > > which should be display in 2015-03-06T18:04:15.000Z format.  
> > > > please suggest me on this due to this my monthly sales also not  
> > > > showing correctly.is there any custom date format need to define when  
> > > > data is populating  
> > > > using river from database.  
> > > > why "-06:00" this is appending at the end of each date please explain  
> > > > me this concept?please help me in this
> > > > 
> > > > Thanks  
> > > > phani
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/190963a8-df42-4026-9fff-5dacecce8590%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9610caa8-9b76-4d8d-aca6-6eec5b6afea3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bc88fde5-0dbd-4c13-ae2d-b2c38702754c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bc88fde5-0dbd-4c13-ae2d-b2c38702754c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:21am UTC](https://discuss.elastic.co/t/elastic-search-river-date-pattern/23083/6 "2017-07-06T00:21:31Z")

</div>


