# Timezone with logstash

**URL:** <https://discuss.elastic.co/t/timezone-with-logstash/65666>\
**Category:** Logstash\
**Created:** [November 10, 2016, 1:45pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666 "2016-11-10T13:45:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 10, 2016, 1:45pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/1 "2016-11-10T13:45:55Z")

</div>

I have a problem with the @timestamp field. Value of @timestamp is always the real event timestamp -2 hrs.  
input{ file {...}}

filter{

```
if [type]=="apachelogs"{

grok{
        match => ["message", "%{COMBINEDAPACHELOG}"]
}
  date {
          timezone => "Europe/kiev"
        match => ["timestamp", "dd/MMM/yyyy:HH:mm:ss Z"]
        remove_field => ["timestamp"]
  }
}

```

}

output{ elasticsearch { hosts =\> ["localhost:9200"]}

The result  
"@timestamp": "2016-11-09T13:29:53.000Z"  
...  
"timestamp": "09/Nov/2016:15:29:53 +0200"

We can see time mismatch . Whan I tune  
date {  
timezone =\> "UTC"  
match =\> ["timestamp", "dd/MMM/yyyy:HH:mm:ss +0200"]  
remove\_field =\> ["timestamp"]  
}  
**match** time @timestamp and timestamp, but Kibana shows the wrong time.  
Any idea about this one ?  
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 10, 2016, 1:48pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/2 "2016-11-10T13:48:25Z")

</div>

The `@timestamp` field is always UTC. This is not configurable.

---

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 10, 2016, 1:52pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/3 "2016-11-10T13:52:58Z")

</div>

> [@magnusbaeck](#):
>
> The @timestamp field is always UTC. This is not configurable.

the time difference is not corrected?

---

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 10, 2016, 1:56pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/4 "2016-11-10T13:56:56Z")

</div>

whereas you can fix the time?

---

<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 10, 2016, 2:00pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/5 "2016-11-10T14:00:45Z")

</div>

> the time difference is not corrected?

The date filter shifts the input timestamp to UTC and stores it in the `@timestamp` field.

---

<div class="post-metadata">

**Author:** ![dmitry1980](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dmitry1980](https://discuss.elastic.co/u/dmitry1980)\
**Post date:** [November 10, 2016, 2:06pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/6 "2016-11-10T14:06:55Z")

</div>

there is no solution to this problem?

---

<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 10, 2016, 2:13pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/7 "2016-11-10T14:13:16Z")

</div>

Why do you think this is a problem? Kibana automatically adjusts the timestamp to the browser's timezone (configurable) and other presentation layers should do the same thing.

---

<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 8, 2016, 2:13pm UTC](https://discuss.elastic.co/t/timezone-with-logstash/65666/8 "2016-12-08T14:13:26Z")

</div>

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