# Date parsing can't update timestamp

**URL:** https://discuss.elastic.co/t/date-parsing-cant-update-timestamp/94893
**Category:** Logstash
**Created:** [July 28, 2017, 3:32am UTC](https://discuss.elastic.co/t/date-parsing-cant-update-timestamp/94893 "2017-07-28T03:32:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Yaohua](https://avatars.discourse-cdn.com/v4/letter/y/3be4f8/32.png) [@Yaohua](https://discuss.elastic.co/u/Yaohua)
#### Post date: [July 28, 2017, 3:32am UTC](https://discuss.elastic.co/t/date-parsing-cant-update-timestamp/94893/1 "2017-07-28T03:32:41Z")

</div>

the date parsing is successful,but the @timestamp not updated  
This is my logstash

```auto
input {
  stdin { codec => json}
  beats {
     port => 5043
   }
}
filter {
      grok {
           patterns_dir => ["/etc/logstash/patterns/"]
           #match => { "log"=> ["%{DOCKER_TIME:drop_time} %{GREEDYMULTILINE:msg}","\[%{DATA:server}\] %{IPORHOST:ip} - - \[%{HTTPDATE:drop_time}\] %{GREEDYMULTILINE:msg}","\[%{TEST:Ttime}\,%{DATA:drop_data}: %{DATA:level}\] %{GREEDYMULTILINE:msg}"]}
           match => { "log" => ["\[%{TEST:Ttime}\,%{DATA:drop_data}: %{DATA:level}\] %{GREEDYMULTILINE:msg}"]}
           pattern_definitions => { "GREEDYMULTILINE" => "(.|\n)*" }
           remove_field => ["log","server","drop_data"]
           }
      date {
      match => ["Ttime", ISO8601,"MMM d HH:mm:ss", "MMM dd HH:mm:ss","yyyy-mm-dd HH:mm:ss","dd/MMM/yyy:HH:mm:ss"]
      target => "@timestamp"
      #remove_field => "drop_time"
      locale => "en"
      timezone => "Asia/Shanghai"
      }

}

output {
  stdout { codec => rubydebug }

```

My input is

```auto
{"log":"[2017-07-28 10:16:53,636: INFO/MainProcess] Received task: utils.tasks.corporation_creamcone_events_notification[f11aa3af-4396-4490-be57-d6910d2c5aa1] \n","stream":"stderr","time":"2017-07-28T02:16:53.636997028Z"}

```

the logstash output as following

```auto
{
           "msg" => "Received task: utils.tasks.corporation_creamcone_events_notification[f11aa3af-4396-4490-be57-d6910d2c5aa1] \n",
    "@timestamp" => 2017-01-28T02:16:53.000Z,
        "stream" => "stderr",
         "level" => "INFO/MainProcess",
         "Ttime" => "2017-07-28 10:16:53",
      "@version" => "1",
          "host" => "vm1",
          "time" => "2017-07-28T02:16:53.636997028Z"
}

```

The TEST pattern as follows  
`TEST \d{4}-\d{2}-\d{2} %{TIME}`

The @timestamp not update!

---

<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: [August 5, 2017, 6:27pm UTC](https://discuss.elastic.co/t/date-parsing-cant-update-timestamp/94893/2 "2017-08-05T18:27:27Z")

</div>

I think you have another date filter in your configuration that incorrectly uses "DD" instead of "dd", because "DD" means "day of the year", and the 28th day of the year is 2017-01-28.

---

<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: [September 2, 2017, 6:28pm UTC](https://discuss.elastic.co/t/date-parsing-cant-update-timestamp/94893/3 "2017-09-02T18:28:09Z")

</div>

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