# Can't change timestamp of logstash to timestamp of log

**URL:** https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134
**Category:** Logstash
**Created:** [January 25, 2021, 4:13pm UTC](https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134 "2021-01-25T16:13:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vladik22](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladik22/32/78720_2.png) [@vladik22](https://discuss.elastic.co/u/vladik22)
#### Post date: [January 25, 2021, 4:13pm UTC](https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134/1 "2021-01-25T16:13:26Z")

</div>

Can't replace timestamp of logstash with timestamp of log file csv and send to elasticsearch.  
in debugger all work.  
When I change output to elasticsearch it's write that is work but after I create index patern in kibana I don't see something in discovery.  
If I delete date filter all work correctly but I need change timestamp.  
version of Elastic Stack 7.10.1  
Java openjdk 14 2020-03-17  
configuration file of logstash

```auto
input {
	file {
		path => "C:/Users/vladi/Desktop/Elastic_Stack/*Z.csv"
		start_position => "beginning"
		sincedb_path => "NULL"
	}
}
filter {
	csv {
		separator => ","
		skip_header => "true"
		columns => ["timestamp","number"]
		remove_field => ["path", "host", "@version"]
	}
	mutate{
		convert => { "number" => "integer" }
	}	
	date {
		match => ["timestamp", "YYYY-MM-dd'T'HH'_'mm'_'ss.SSS'Z'"]
		timezone => "UTC"
		add_field => { "debug" => "timestampMatched"}
		remove_field => ["timestamp"]
	}
}
output {
	stdout { codec => rubydebug }
}

```

I get:

```auto
{
        "number" => 1232,
       "message" => "2020-12-10T09_24_13.986Z,1232\r",
    "@timestamp" => 2020-12-10T09:24:13.986Z,
         "debug" => "timestampMatched"
}

```

When I change output to elasticsearch after creating index patern and entering to discovery I take error:

 ![error](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e74ad056c182e168cddf2c7ceff7c535a29b787.png)  
How can I solve it?

---

<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: [January 25, 2021, 7:09pm UTC](https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134/2 "2021-01-25T19:09:31Z")

</div>

You have kibana configured to show data from "This week", that would definitely not include December 10th from last year.

---

<div class="post-metadata">

### Author: ![vladik22](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladik22/32/78720_2.png) [@vladik22](https://discuss.elastic.co/u/vladik22)
#### Post date: [January 25, 2021, 9:20pm UTC](https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134/3 "2021-01-25T21:20:33Z")

</div>

Thanks

---

<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: [February 22, 2021, 9:20pm UTC](https://discuss.elastic.co/t/cant-change-timestamp-of-logstash-to-timestamp-of-log/262134/4 "2021-02-22T21:20:38Z")

</div>

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