# Custom timestamp field off by timezone offset

**URL:** <https://discuss.elastic.co/t/custom-timestamp-field-off-by-timezone-offset/107077>\
**Category:** Logstash\
**Created:** [November 9, 2017, 5:41pm UTC](https://discuss.elastic.co/t/custom-timestamp-field-off-by-timezone-offset/107077 "2017-11-09T17:41:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsaeks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsaeks/32/5068_2.png) [@rsaeks](https://discuss.elastic.co/u/rsaeks)\
**Post date:** [November 9, 2017, 5:41pm UTC](https://discuss.elastic.co/t/custom-timestamp-field-off-by-timezone-offset/107077/1 "2017-11-09T17:41:50Z")

</div>

I'm working on revamping some indexes for data and am running into an issue with times. I'm currently ingesting entries like this one below:

\<164\>Nov 09 2017 11:26:09: %ASA-4-106023: Deny tcp src outside:191.101.167.235/45269 dst outside:65.126.243.209/8545 by access-group "private\_in" [0x0, 0x0]

Using the cisco filters all the data is parsing out correctly and going into the correct fields. What I would like to do is use the field eventtime as the time filter field name. In the input filter I'm using the following statement to match the time (correctly):

date {  
match =\> ["timestamp","MMM dd yyyy HH:mm:ss","MMM d yyyy HH:mm:ss"]  
}

Since I'm using a custom index pattern I've created a mapping for the timestamp field:  
"timestamp" : {"type" : "date", "format" : "MMM dd YYYY hh:mm:ss"},

Once the time appears in the index template at this point the time changes to November 9th 2017, 05:26:09.000

If I let the field be created automatically the time is recognized properly, however, I can't use the field as the time filter field. Would there be a way to just append the timezone to the timestamp field for this specific filter?

Thanks!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 9, 2017, 9:46pm UTC](https://discuss.elastic.co/t/custom-timestamp-field-off-by-timezone-offset/107077/2 "2017-11-09T21:46:57Z")

</div>

> date {  
> match =\> ["timestamp","MMM dd yyyy HH:mm:ss","MMM d yyyy HH:mm:ss"]  
> }
> 
> Since I'm using a custom index pattern I've created a mapping for the timestamp field:  
> "timestamp" : {"type" : "date", "format" : "MMM dd YYYY hh:mm:ss"},

I'm confused. You're using the date filter to parse `timestamp` and store in `@timestamp`, but you're _also_ storing the raw `timestamp` value and configuring ES to recognize the timestamp format. Why do you want to store the same timestamp in different fields and in different formats?

---

<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:** [December 7, 2017, 9:47pm UTC](https://discuss.elastic.co/t/custom-timestamp-field-off-by-timezone-offset/107077/3 "2017-12-07T21:47:13Z")

</div>

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