<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 12 hour timeformat without AM/PM distinction in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456405#M78918</link>
    <description>&lt;P&gt;Thanks I'll give that a try.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Nov 2018 14:18:47 GMT</pubDate>
    <dc:creator>jdoll1</dc:creator>
    <dc:date>2018-11-09T14:18:47Z</dc:date>
    <item>
      <title>12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456400#M78913</link>
      <description>&lt;P&gt;I have some data that we're ingesting that has "bad" timestamps.  There is no AM/PM distinction, and they are in 12 hour format.&lt;/P&gt;

&lt;P&gt;I have my timeformat in my props.conf as: &lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %a %b %d %Y %I:%M:%S.%3N&lt;/P&gt;

&lt;P&gt;Will this extract the timestamps properly?  It seems to in my sample extractions but I can't see how Splunk could know the AM/PM without the fields being there.&lt;/P&gt;

&lt;P&gt;example log entries..first one is 11:26pm, second one is 12:13am.  Third example is 4:34....no idea if thats AM or PM.&lt;/P&gt;

&lt;P&gt;How does the %I know to use AM or PM if there isn't a variable present for that?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;                                  MessageUtil.java:58        &amp;gt; /* Sun Jul 22 2018 11:26:18.312 */  Failed to load resource bundle-BuilderMessages

&amp;lt;                                  MessageUtil.java:58        &amp;gt; /* Mon Jul 23 2018 12:13:12.000 */  Failed to load resource bundle-BuilderMessages

&amp;lt;                                  MessageUtil.java:58        &amp;gt; /* Mon Jul 23 2018 04:34:34.853 */  Failed to load resource bundle-BuilderMessages
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Oct 2018 14:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456400#M78913</guid>
      <dc:creator>jdoll1</dc:creator>
      <dc:date>2018-10-31T14:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: 12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456401#M78914</link>
      <description>&lt;P&gt;I added this to a dev server yesterday morning and for now it seems to be properly indexing the timestamp as AM/PM, but the question remains, how does Splunk determine it?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 12:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456401#M78914</guid>
      <dc:creator>jdoll1</dc:creator>
      <dc:date>2018-11-01T12:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: 12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456402#M78915</link>
      <description>&lt;P&gt;Hi @jdoll1 ,&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Your time in event is incomplete, if this is 12 hour format then it must have specified AM/PM. You can use &lt;STRONG&gt;%p&lt;/STRONG&gt; to extract time with AM/PM as %I cannot extract AM/PM.&lt;/LI&gt;
&lt;LI&gt;Or you should consider your time in 24 hour format. In that case you can use &lt;STRONG&gt;%H&lt;/STRONG&gt; instead of %I.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Coming to your question in comment, whether it will pick AM/PM if you will not provide that information in event.&lt;BR /&gt;
So I've tested in Splunk version 7.0.1 and I'm getting same result as you are getting. So my conclusion is when you not provide AM/PM and if hour in the time is &lt;STRONG&gt;12&lt;/STRONG&gt; then it will consider &lt;STRONG&gt;AM&lt;/STRONG&gt;, in all other cases it is considering &lt;STRONG&gt;PM&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Please consider putting complete time in event if source of the event is in your hand.&lt;BR /&gt;
Hope this helps!!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 14:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456402#M78915</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-11-01T14:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: 12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456403#M78916</link>
      <description>&lt;P&gt;Yeah I wish I could include the AM/PM or 24 hour time. These are logs written by a vendor app that we don't have control over.  I guess my 'safest' option is to just use the index time as the timestamp and not use the timestamp written in the log.&lt;/P&gt;

&lt;P&gt;The odd thing is that Splunk seems to be ingesting the data with the correct times using %I, even though it shouldn't without the AM/PM.  I just don't trust it to continue ingesting properly.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 14:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456403#M78916</guid>
      <dc:creator>jdoll1</dc:creator>
      <dc:date>2018-11-01T14:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: 12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456404#M78917</link>
      <description>&lt;P&gt;If you want to use current time instead of extracting time from event, you can write below configuration into your props.conf file.&lt;/P&gt;

&lt;P&gt;[your-sourcetype]&lt;BR /&gt;
DATETIME_CONFIG = CURRENT&lt;/P&gt;

&lt;P&gt;In stanza name instead of sourcetype, you can also specify source or host. Please read more details in &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.0/Admin/Propsconf"&gt;props.conf&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 08:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456404#M78917</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-11-02T08:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: 12 hour timeformat without AM/PM distinction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456405#M78918</link>
      <description>&lt;P&gt;Thanks I'll give that a try.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2018 14:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/12-hour-timeformat-without-AM-PM-distinction/m-p/456405#M78918</guid>
      <dc:creator>jdoll1</dc:creator>
      <dc:date>2018-11-09T14:18:47Z</dc:date>
    </item>
  </channel>
</rss>

