# AM to PM timestamp conversion not working as expected

**URL:** <https://discuss.elastic.co/t/am-to-pm-timestamp-conversion-not-working-as-expected/115723>\
**Category:** Logstash\
**Created:** [January 16, 2018, 1:33pm UTC](https://discuss.elastic.co/t/am-to-pm-timestamp-conversion-not-working-as-expected/115723 "2018-01-16T13:33:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashok\_Nair](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@Ashok\_Nair](https://discuss.elastic.co/u/Ashok_Nair)\
**Post date:** [January 16, 2018, 1:33pm UTC](https://discuss.elastic.co/t/am-to-pm-timestamp-conversion-not-working-as-expected/115723/1 "2018-01-16T13:33:28Z")

</div>

Following is my input data stream:  
\<Dec 16, 2017 10:21:07 PM\> \<Starting WebLogic server with command line: /pmck2o/admin/user\_projects/ohsdomain/bin/startWebLogic.sh \>

I am using this filter in logstash:  
grok{  
match=\>{"message"=\>"\<%{DATA:timestamp}\> \<%{DATA:error\_type}\> \<%{DATA:java\_class}\> \<%{GREEDYDATA:description}\>"}  
}

date {  
match =\> ["timestamp", "MMM d, yyyy H:m:s a"]  
target =\> "@timestamp"  
}

Following is the issue we are facing with the data in kibana:  
We are hoping to get the timestamp as it is converted into AM or PM depending on the incoming data.

For example:\<Dec 16, 2017 10:21:07 PM\> should be interpreted as December 16th 2017, 22:21:07.000 in the @timestamp field in kibana. However, it getting interpreted as December 16th 2017, 10:21:07.000

I would appreciate it if someone can point me to what I am doing wrong in the logstash conf file.

I am currently using ELK 5.2.

---

<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 13, 2018, 1:33pm UTC](https://discuss.elastic.co/t/am-to-pm-timestamp-conversion-not-working-as-expected/115723/2 "2018-02-13T13:33:44Z")

</div>

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