# Create a new field type date from csv with logstash

**URL:** <https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940>\
**Category:** Logstash\
**Created:** [July 11, 2019, 8:39am UTC](https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940 "2019-07-11T08:39:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GitsBdr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitsbdr/32/58828_2.png) [@GitsBdr](https://discuss.elastic.co/u/GitsBdr)\
**Post date:** [July 11, 2019, 8:39am UTC](https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940/1 "2019-07-11T08:39:51Z")

</div>

Hi all,

Thanks in advance for your help here  
Just trying to figure out what I am doing wrong.  
I've got a field from a csv file called 'time' and looks like : '07:00:01.000' and I'm trying to create the field 'eventdate' as below (to use it as time filter then for my Kibana index, so it has to be recognize as a date type automatically by elastic)

```
mutate { add_field => { "eventdate" => "%{+YYYY.MM.dd} %{time}" } }
date {
  locale => "en"
  match => ["eventdate", "YYYY.MM.dd HH:mm:ss.SSS"]
  target => "eventdate"
}

```

this one worked well but the eventdate was converted to my local server time (so if time=7am, eventdate would be 8am ...)

My logstash stdout{} looks good with evendate at 7am but once inserted in Kibana, it gets one hour more ...  
I would prefer to keep my kibana settings like they are right now, just try to import a date as it goes out of logstash ...

Thanks all ! 🙂

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [July 11, 2019, 11:32am UTC](https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940/2 "2019-07-11T11:32:21Z")

</div>

Check in Kibana the parameters of your space, mainly Kibana use by default your browser time zone

---

<div class="post-metadata">

**Author:** ![GitsBdr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitsbdr/32/58828_2.png) [@GitsBdr](https://discuss.elastic.co/u/GitsBdr)\
**Post date:** [July 11, 2019, 12:44pm UTC](https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940/3 "2019-07-11T12:44:14Z")

</div>

Hi @ylasri  
Thanks for answering  
Found it and fixed now

---

<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:** [August 8, 2019, 12:44pm UTC](https://discuss.elastic.co/t/create-a-new-field-type-date-from-csv-with-logstash/189940/4 "2019-08-08T12:44:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
