# Logstash - how to parse rsyslog date field from logs message into @timestamp (UTC)

**URL:** <https://discuss.elastic.co/t/logstash-how-to-parse-rsyslog-date-field-from-logs-message-into-timestamp-utc/265897>\
**Category:** Logstash\
**Tags:** ingest-pipeline\
**Created:** [March 2, 2021, 5:27am UTC](https://discuss.elastic.co/t/logstash-how-to-parse-rsyslog-date-field-from-logs-message-into-timestamp-utc/265897 "2021-03-02T05:27:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [March 5, 2021, 4:27pm UTC](https://discuss.elastic.co/t/logstash-how-to-parse-rsyslog-date-field-from-logs-message-into-timestamp-utc/265897/2 "2021-03-05T16:27:40Z")

</div>

I have not tested it, but you could try

```
grok { match => { "message" => "(?<[@metadata][ts]>\d{4} \d{2}:\d{2}:\d{2})" } }
date { match => ["[@metadata][ts]", "MMdd HH:mm:ss" ] }

```

See comments on guessing the year [here](https://discuss.elastic.co/t/grok-timestamp/265236/2).

---

_[View the full topic](https://discuss.elastic.co/t/logstash-how-to-parse-rsyslog-date-field-from-logs-message-into-timestamp-utc/265897)._
