<?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: Stop times like '0:20:00' being read as 8pm in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12154#M853</link>
    <description>&lt;P&gt;I've tried both, neither work.&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2010 14:38:03 GMT</pubDate>
    <dc:creator>parallaxed</dc:creator>
    <dc:date>2010-05-25T14:38:03Z</dc:date>
    <item>
      <title>Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12146#M845</link>
      <description>&lt;P&gt;Splunk always seems to get this wrong. I have the following in a vain effort to correct this&lt;/P&gt;

&lt;P&gt;TIME_PREFIX=^&lt;/P&gt;

&lt;P&gt;TIME_FORMAT=%D%t%T&lt;/P&gt;

&lt;P&gt;Didn't really do anything for the situation. Wondering if there's some other config I can try?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2010 19:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12146#M845</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-04-23T19:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12147#M846</link>
      <description>&lt;P&gt;There's many other possible configs you can try, but trying to guess the exact format of the entire timestamp is beyond my capabilities.  When you ask a question that'd dependant on the format of an event, why not paste in an example so we can see what you're talking about?  If there's sensitve data in there just anonymize it with x's or something.&lt;/P&gt;

&lt;P&gt;This is the page you want to read first - &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Data/Configuretimestamprecognition#Enhanced_strptime.28.29_support" rel="nofollow"&gt;Enhanced strptime() support&lt;/A&gt; and then &lt;A href="http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html" rel="nofollow"&gt;here&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Your setting - TIME_FORMAT=%D%t%T&lt;/P&gt;

&lt;P&gt;%D - The date as %m / %d / %y.&lt;BR /&gt;
%t - white space&lt;BR /&gt;
%T - The time as %H : %M : %S.  &lt;/P&gt;

&lt;P&gt;Where did you get these values?&lt;/P&gt;

&lt;P&gt;How about - TIME_FORMAT=%H:%M:%s&lt;/P&gt;

&lt;P&gt;%H = The hour (24-hour clock)&lt;BR /&gt;
%M = The minute [00,59]&lt;BR /&gt;
%S = The seconds [00,60]&lt;/P&gt;

&lt;P&gt;Note the ':' in there as well, you're specifying the exact format of the timestamp so you have to include everything that is contained within it.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2010 21:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12147#M846</guid>
      <dc:creator>Mick</dc:creator>
      <dc:date>2010-04-23T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12148#M847</link>
      <description>&lt;P&gt;In addition to Mick's answer (which is that you should use the correct &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; according to what is in your data) you may also need to look into the &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; setting, which will control how far into a line Splunk will keep looking for a timestamp. Simply setting the &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; just tells Splunk to start looking for times is sees the &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt;, but it could be anywhere after the prefix.&lt;/P&gt;

&lt;P&gt;If you provide what an actual line of data looks like, perhaps we can help. If the TIME_FORMAT can't be found, Splunk rather aggressively attempts to derive &lt;EM&gt;some&lt;/EM&gt; timestamp from your data, as a time is always required to write an event into the Splunk index.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2010 03:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12148#M847</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-25T03:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12149#M848</link>
      <description>&lt;P&gt;The event line looks like the following:&lt;/P&gt;

&lt;P&gt;05/20/2010   0:20:00,someData,1274329200,60,0,2,someData,8256952.0,3913828.0,4007580.0,50.0&lt;/P&gt;

&lt;P&gt;^ the timestamp is recognized as 8pm.&lt;/P&gt;

&lt;P&gt;The only exception that I can see here is that there are three lots of whitespace between %Y and %H, shouldn't %t cover multiple spaces anyhow? It seems the '0:' following %t is being ignored.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2010 23:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12149#M848</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-21T23:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12150#M849</link>
      <description>&lt;P&gt;Seems whitespace doesn't work, hope that's clear though...&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2010 23:22:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12150#M849</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-21T23:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12151#M850</link>
      <description>&lt;P&gt;Further to the comment above, I should add that I've tested with %D%t%t%t%T and more specific strptime formats, none of them seem to work with this kind of event (i.e. missing a leading 0 off the %T). Is this a bug?&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2010 23:30:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12151#M850</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-21T23:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12152#M851</link>
      <description>&lt;P&gt;Additionally, as a consequence of the above, the times 0:01:00 through 0:23:00 are also affected (interpreted as 24 hour times exc. leading 0). 0:24:00 is recognized correctly as 12:24AM, example line:&lt;/P&gt;

&lt;P&gt;05/20/2010   0:24:00,someData,1274329440,60,0,2,8256952.0,3913828.0,4007580.0,50.0&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2010 23:38:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12152#M851</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-21T23:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12153#M852</link>
      <description>&lt;P&gt;Could you try using %H:%M:%S instead of %T? I have never used %T.&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2010 07:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12153#M852</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-05-22T07:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12154#M853</link>
      <description>&lt;P&gt;I've tried both, neither work.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2010 14:38:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12154#M853</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-25T14:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12155#M854</link>
      <description>&lt;P&gt;i'd say pretty much a bug. it &lt;EM&gt;might&lt;/EM&gt; be possible to work around it with a custom datetime.xml setting.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2010 19:43:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12155#M854</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-05-25T19:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Stop times like '0:20:00' being read as 8pm</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12156#M855</link>
      <description>&lt;P&gt;This is due to the fact that default etc/datetime.xml regex is not greedy enough:&lt;/P&gt;

&lt;P&gt;&amp;lt;define name="_hour" extract="hour"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[([01]?[1-9]|[012][0-3])(?!\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;&lt;/P&gt;

&lt;P&gt;Adding an additional clause fixed this:&lt;/P&gt;

&lt;P&gt;&amp;lt;define name="_hour" extract="hour"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[([01]|[01]?[1-9]|[012][0-3])(?!\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 18:29:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Stop-times-like-0-20-00-being-read-as-8pm/m-p/12156#M855</guid>
      <dc:creator>parallaxed</dc:creator>
      <dc:date>2010-05-27T18:29:05Z</dc:date>
    </item>
  </channel>
</rss>

