# How I can replace time with actual time in my log file?

**URL:** <https://discuss.elastic.co/t/how-i-can-replace-time-with-actual-time-in-my-log-file/190891>\
**Category:** Logstash\
**Created:** [July 17, 2019, 7:05am UTC](https://discuss.elastic.co/t/how-i-can-replace-time-with-actual-time-in-my-log-file/190891 "2019-07-17T07:05:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbke\_baap](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@sbke\_baap](https://discuss.elastic.co/u/sbke_baap)\
**Post date:** [July 17, 2019, 7:05am UTC](https://discuss.elastic.co/t/how-i-can-replace-time-with-actual-time-in-my-log-file/190891/1 "2019-07-17T07:05:21Z")

</div>

While uploading my data, the time field is getting update with the uploading time.

Given below is my sample data

\<134\> id=firewall sn=C0EAE4F8239E time="2019-03-01 03:26:12 UTC" fw=203.109.120.130 pri=6 c=1024 m=537 msg="Connection Closed" app=49279 appName="Service SMB" n=1083492749 src=172.25.23.102:52096:X6 dst=116.199.6.106:445:X7 proto=tcp/445 sent=52 spkt=1

Code I'm using

date {  
match =\> ["time" , "yyyy-MM-dd' HH:mm:ss ZZZ"]  
remove\_field =\> ["timestamp"]  
} ![Screenshot%20(12)](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1b34bf21aa9de6baeb5341f44addb1734e57448b.png)

---

<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:** [July 17, 2019, 1:27pm UTC](https://discuss.elastic.co/t/how-i-can-replace-time-with-actual-time-in-my-log-file/190891/2 "2019-07-17T13:27:02Z")

</div>

Remove the ' at the end of the date pattern in your date filter. I would also remove the remove\_field option since it does nothing.

---

<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:** [August 14, 2019, 1:27pm UTC](https://discuss.elastic.co/t/how-i-can-replace-time-with-actual-time-in-my-log-file/190891/3 "2019-08-14T13:27:06Z")

</div>

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