# Difference in time between timestamp and @timestamp

**URL:** <https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456>\
**Category:** Logstash\
**Created:** [May 7, 2020, 5:50am UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456 "2020-05-07T05:50:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Krishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_krishna/32/62678_2.png) [@Hari\_Krishna](https://discuss.elastic.co/u/Hari_Krishna)\
**Post date:** [May 7, 2020, 5:50am UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/1 "2020-05-07T05:50:31Z")

</div>

I have written the date filter as follows

```
date {
        match => ["timestamp","yyyy-MM-dd HH:mm:ss.SSSSSSSSS"]
        target => "@timestamp"
        timezone => "Asia/Kolkata"
     }

```

> timestamp : 2020-04-17 12:10:15.792310475  
> @timestamp : Apr 17, 2020 @ 06:40:15.792

I see that there is 5:30 hrs difference between the timestamps.  
i tried changing the timezone but it didnt work.

---

<div class="post-metadata">

**Author:** ![Rahul\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_kumar4/32/67369_2.png) [@Rahul\_Kumar4](https://discuss.elastic.co/u/Rahul_Kumar4)\
**Post date:** [May 7, 2020, 10:39am UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/2 "2020-05-07T10:39:15Z")

</div>

It looks like it is doing what you want it to. There is a 5:30 hrs of time difference between UTC (which your timestamp probably represents) and ASIA/Kolkata.

---

<div class="post-metadata">

**Author:** ![Hari\_Krishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_krishna/32/62678_2.png) [@Hari\_Krishna](https://discuss.elastic.co/u/Hari_Krishna)\
**Post date:** [May 7, 2020, 10:52am UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/3 "2020-05-07T10:52:00Z")

</div>

```
date {
        match => ["timestamp","yyyy-MM-dd HH:mm:ss.SSSSSSSSS"]
        target => "@timestamp"
     }

```

This is my original date filter. It gave me the above result.  
So i tried setting the timezone to Asia/Kolkata.  
But it gave me the same result

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 7, 2020, 4:01pm UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/4 "2020-05-07T16:01:44Z")

</div>

@timestamp is always in UTC, because elasticsearch always stores dates as UTC (kibana then translates them into the browser's timezone). The timezone option on the date filter is used to tell it what timezone the log file uses.

---

<div class="post-metadata">

**Author:** ![Hari\_Krishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_krishna/32/62678_2.png) [@Hari\_Krishna](https://discuss.elastic.co/u/Hari_Krishna)\
**Post date:** [May 7, 2020, 4:04pm UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/5 "2020-05-07T16:04:33Z")

</div>

Okay. But i tried setting the timeszone but it gives me the same output

---

<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:** [June 4, 2020, 4:04pm UTC](https://discuss.elastic.co/t/difference-in-time-between-timestamp-and-timestamp/231456/6 "2020-06-04T16:04:54Z")

</div>

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