<?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: Time not parsed correct suddenly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23540#M96566</link>
    <description>&lt;P&gt;This is probably due to that you specify that Splunk should look for the 2-digit day of the month (%d) instead of the 1-digit day (%e), which is what you'll find in your logs at the beginning of the month. In other words, Splunk would fully understand the string "30/04" when you use "%d/%m", but not "1/05" (it would have to be "01/05" to be matched by the format string). Also, you have "%y" in your format string - %y is the year without century so the format string would match "13" but not "2013".&lt;/P&gt;

&lt;P&gt;Due to this I'm pretty sure that your own format string has never worked, so Splunk has relied on its own default ones for finding valid timestamps, and these by default look for timestamps in US format where month comes before date.&lt;/P&gt;

&lt;P&gt;A format string that would probably work better would look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %e/%m/%Y %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 May 2013 09:13:11 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-05-03T09:13:11Z</dc:date>
    <item>
      <title>Time not parsed correct suddenly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23539#M96565</link>
      <description>&lt;P&gt;I have lines of data that looks like this (1 line) in the file source="C:\Temp\testResultLog.csv":&lt;/P&gt;

&lt;P&gt;RT0963-01,7/02/2013 13:33:22,19/04/2013 11:13:03,0,R_1812,0,Netscape3.0,0,0,0,172.21.0.132,172.21.0.132,ohm-web-7.9.5 (d921a - 2013-05-02 13:30:00),20130502_133229,2/05/2013 20:00:02,&lt;STRONG&gt;2/05/2013 20:00:08&lt;/STRONG&gt;,6,True,DAVIDJ-3500,x86,4&lt;/P&gt;

&lt;P&gt;For the file containing these lines I have the following in the props.config file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testResultLog]  
CHECK_FOR_HEADER = true  
KV_MODE = none  
MAX_TIMESTAMP_LOOKAHEAD = 20  
NO_BINARY_CHECK = 1  
SHOULD_LINEMERGE = False  
TIME_FORMAT = %d/%m/%y %H:%M:%S  
TIME_PREFIX = \d{8}_\d{6},  
pulldown_type = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should extract the time as indicated in bold in the data. For times before may, Splunk extracted this correct; however from may, it parses the date in the above line as the 5th of february, whereas it should parse it as the second of may.&lt;/P&gt;

&lt;P&gt;An example of a line that was parsed correct:&lt;/P&gt;

&lt;P&gt;BT01-02,18/03/2008 9:26:09,19/04/2013 11:11:16,0,R_1812,0,Netscape3.0,0,0,3,172.21.0.120,172.21.0.120,ohm-web-8.0.0-SNAPSHOT (c2601 - 2013-04-28 21:01:16),20130429_110040,29/04/2013 11:00:43,&lt;STRONG&gt;29/04/2013 11:02:34&lt;/STRONG&gt;,111,True,DAVIDJ-3500,x86,4&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;BR /&gt;&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:49:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23539#M96565</guid>
      <dc:creator>davidjehoul</dc:creator>
      <dc:date>2020-09-28T13:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Time not parsed correct suddenly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23540#M96566</link>
      <description>&lt;P&gt;This is probably due to that you specify that Splunk should look for the 2-digit day of the month (%d) instead of the 1-digit day (%e), which is what you'll find in your logs at the beginning of the month. In other words, Splunk would fully understand the string "30/04" when you use "%d/%m", but not "1/05" (it would have to be "01/05" to be matched by the format string). Also, you have "%y" in your format string - %y is the year without century so the format string would match "13" but not "2013".&lt;/P&gt;

&lt;P&gt;Due to this I'm pretty sure that your own format string has never worked, so Splunk has relied on its own default ones for finding valid timestamps, and these by default look for timestamps in US format where month comes before date.&lt;/P&gt;

&lt;P&gt;A format string that would probably work better would look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %e/%m/%Y %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 May 2013 09:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23540#M96566</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-03T09:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Time not parsed correct suddenly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23541#M96567</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;It seems like you have marked (in bold) the wrong part of the message, given the TIME_PREFIX declaration. Splunk will start looking for a timestamp immediately after the TIME_PREFIX, which in this case is &lt;CODE&gt;dddddddd_dddddd,&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Also, your TIME_FORMAT is in part wrong. You could try to change your it to;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %e/%m/%Y %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where &lt;CODE&gt;%e&lt;/CODE&gt; is days 1-31, instead of &lt;CODE&gt;%d&lt;/CODE&gt;, which is 01-31&lt;BR /&gt;
and &lt;CODE&gt;%Y&lt;/CODE&gt; which is YYYY, instead of &lt;CODE&gt;%y&lt;/CODE&gt;, which is YY&lt;/P&gt;

&lt;P&gt;See &lt;A href="http://www.strftime.net" target="_blank"&gt;http://www.strftime.net&lt;/A&gt;  for more info.&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23541#M96567</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T13:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time not parsed correct suddenly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23542#M96568</link>
      <description>&lt;P&gt;NOT AGAIN!!! I'll still leave my posting because of the TIME_PREFIX issue.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 09:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23542#M96568</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-03T09:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time not parsed correct suddenly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23543#M96569</link>
      <description>&lt;P&gt;Indeed, I marked the wrong part. Sorry for that! Thanks for the answer!&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 09:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-not-parsed-correct-suddenly/m-p/23543#M96569</guid>
      <dc:creator>davidjehoul</dc:creator>
      <dc:date>2013-05-03T09:48:47Z</dc:date>
    </item>
  </channel>
</rss>

