# @timestamp is different in kibana then output of rubydebug @timestamp

**URL:** <https://discuss.elastic.co/t/timestamp-is-different-in-kibana-then-output-of-rubydebug-timestamp/110957>\
**Category:** Kibana\
**Created:** [December 10, 2017, 7:18am UTC](https://discuss.elastic.co/t/timestamp-is-different-in-kibana-then-output-of-rubydebug-timestamp/110957 "2017-12-10T07:18:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Nigam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_nigam/32/25094_2.png) [@Vivek\_Nigam](https://discuss.elastic.co/u/Vivek_Nigam)\
**Post date:** [December 10, 2017, 7:18am UTC](https://discuss.elastic.co/t/timestamp-is-different-in-kibana-then-output-of-rubydebug-timestamp/110957/1 "2017-12-10T07:18:38Z")

</div>

in MY rubydebug output @timestamp is correct but while creating index pattern in kibana @timestamp is current system time stamp.

Rubydebug output is correct :

"@timestamp" =\> 2017-12-08T23:07:51.086Z,  
"mytimestamp" =\> "12082017 23:07:51.086"

but in kibana its like:  
December 09th 2017, 05:29:55.657

## my code:

input {  
file {  
type =\> "caus"  
path =\> "/opt/logs/\*"  
start\_position =\> "beginning"

```
            }
    }

```

filter {  
if [type] == "caus" {

grok {  
match =\> [  
"path",  
"^%{GREEDYDATA}/[^/]+\_%{INT:filedate}.txt$"  
]  
}  
grok {  
patterns\_dir =\> ["/etc/logstash/patterns"]  
match =\> ["message", "%{CAUS}"]  
add\_tag =\>["Queues"]  
}  
}  
mutate {  
convert =\> { "records" =\> "integer" }  
convert =\> { "PRIORITY" =\> "integer" }  
convert =\> { "Ctime" =\> "integer" }

add\_field =\> {  
"mytimestamp" =\> "%{filedate} %{MyTimeStamp}"  
}  
}

date {  
match =\> ["mytimestamp", "MMddyyyy HH:mm:ss.SSS"]  
timezone =\> "UTC"  
}  
}

output {

if [type] == "caus" {  
elasticsearch {  
index =\> "mydata2"  
hosts =\> ["localhost:9200"]  
user =\> "elastic"  
password =\> changeme  
sniffing =\> true  
manage\_template =\> true  
}  
}

Please advise

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 10, 2017, 8:12am UTC](https://discuss.elastic.co/t/timestamp-is-different-in-kibana-then-output-of-rubydebug-timestamp/110957/2 "2017-12-10T08:12:33Z")

</div>

Elasticsearch requires all timestamps to be in UTC timezone, and Kibana will adjust this to your local timezone when displaying it. I would expect this kind of behaviour if the timestamp you are converting using the date filter is not in UTC as the timezone parameter specifies.

---

<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:** [January 7, 2018, 8:23am UTC](https://discuss.elastic.co/t/timestamp-is-different-in-kibana-then-output-of-rubydebug-timestamp/110957/3 "2018-01-07T08:23:29Z")

</div>

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