<?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: Timezone calculation error? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72928#M14903</link>
    <description>&lt;P&gt;wait, more questions abound. I read that too quickly.  The hours, minutes, and seconds are not zero padded.  I don't understand why the "-" is omitted for those.  I am going to put this in place and see what happens!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2011 00:38:58 GMT</pubDate>
    <dc:creator>jgauthier</dc:creator>
    <dc:date>2011-04-06T00:38:58Z</dc:date>
    <item>
      <title>Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72920#M14895</link>
      <description>&lt;P&gt;I just finished loading a lot of data, and when reviewing it, I am seeing something odd.&lt;/P&gt;

&lt;P&gt;First, my log file is in GMT, and I've set up my props.conf to look like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Exchange2003]
TIME_FORMAT = %Y-%-m%-d\t%-H:%-M:%-S
TIME_PREFIX = ^
MAX_TIMESTAMP_LOOKAHEAD = 15
KV_MODE = none
SHOULD_LINEMERGE = false
TRANSFORM
REPORT-Exchange2003 = Exchange2003
TZ=GMT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have three log file entries I've identified for comparison:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Log file:
2011-4-1    0:4:42 GMT
Splunk Time:
4/1/11 12:03:28.478 AM 

Log file:
2011-4-1    1:21:34 GMT
Splunk Time:
3/31/11 9:21:34.000 PM

Log file:
2011-4-1    1:20:26 GMT
Splunk Time:
4/1/11 9:20:12.081 PM   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Notice the one in the middle is correct.  I'm not sure what caused it, or how to fix it.  Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 08:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72920#M14895</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-01T08:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72921#M14896</link>
      <description>&lt;P&gt;Anything different about the logs associated with the incorrect time?  I assume Splunk is using 'index' time versus parsing the time from the logged event?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 19:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72921#M14896</guid>
      <dc:creator>netwrkr</dc:creator>
      <dc:date>2011-04-01T19:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72922#M14897</link>
      <description>&lt;P&gt;The lines look the same. This is a tab delimeted file, and every entry is idenitical.  New items coming in are wrong still, (just checked this morning).  It's not using index time, as it's 9:07am (ET) now, and splunk is showing this:&lt;BR /&gt;
4/1/11 11:23:10.034 PM&lt;BR /&gt;
But the log is:&lt;BR /&gt;
2011-4-1    3:23:18 GMT &lt;BR /&gt;
So, it should be more like 03/31/11 00:23:18.&lt;BR /&gt;
Not in the future! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;BR /&gt;
It looks like some are correct and others are not.&lt;BR /&gt;
Another example:&lt;BR /&gt;
Log File:&lt;BR /&gt;
2011-4-1    13:9:58&lt;BR /&gt;
Splunk: &lt;BR /&gt;
4/1/119:09:58.000 AM&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 20:13:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72922#M14897</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-01T20:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72923#M14898</link>
      <description>&lt;P&gt;I added that too soon  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Log file:&lt;BR /&gt;
2011-4-1    9:16:32 GMT&lt;BR /&gt;
Splunk:&lt;BR /&gt;
4/1/11    9:16:30.224 AM&lt;BR /&gt;
Notice the time!  It's not 9:16AM yet.  It's almost like it has ignored the TZ setting, and perhaps only on single digit hours?&lt;BR /&gt;
Looking for more details.  Host, sourcetype, and source are identical.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 20:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72923#M14898</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-01T20:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72924#M14899</link>
      <description>&lt;P&gt;Just bumping this for more ideas.  This is still happening with new events.&lt;BR /&gt;
I have no idea where to go with this.  &lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 08:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72924#M14899</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-05T08:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72925#M14900</link>
      <description>&lt;P&gt;What's the name of the file? Also, it looks to me like your TIME_FORMAT above is just wrong, so can you confirm what is in your config file?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Update:&lt;/P&gt;

&lt;P&gt;Seems to me your &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; is basically wrong and will never match your data, so Splunk is pretty much just guessing from where-ever it can, including the file name and/or file mod time, so it probably seems mysterious.&lt;/P&gt;

&lt;P&gt;This is what you have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%Y-%-m%-d\t%-H:%-M:%-S 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%Y-%m-%d%t%H:%M:%S %Z
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2011 13:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72925#M14900</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-04-05T13:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72926#M14901</link>
      <description>&lt;P&gt;Sure!  Log files are named like this: 40110504.log (today's)&lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%-m%-d\t%-H:%-M:%-S&lt;BR /&gt;
I've compared it visually to the log file entry, and I don't see anything wrong &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;  I have also done only 3 custom log files, so I'm not a champion by any means &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 18:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72926#M14901</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-05T18:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72927#M14902</link>
      <description>&lt;P&gt;So, a tab is %t not \t?&lt;BR /&gt;
(just to confirm)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 00:37:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72927#M14902</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-06T00:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72928#M14903</link>
      <description>&lt;P&gt;wait, more questions abound. I read that too quickly.  The hours, minutes, and seconds are not zero padded.  I don't understand why the "-" is omitted for those.  I am going to put this in place and see what happens!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 00:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72928#M14903</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-06T00:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72929#M14904</link>
      <description>&lt;P&gt;I read up on the strptime() requirements.  I see the %t now.  Understood.  for %Y,%m,%d,%H,%M, and %S it is indicated that "leading zeros are permitted but not required".  so why include a dash on the date and not time? I would think both could possibly be removed. Thanks a bunch!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 00:48:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72929#M14904</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-06T00:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72930#M14905</link>
      <description>&lt;P&gt;&lt;CODE&gt;strptime()&lt;/CODE&gt; format has essentially nothing to do with &lt;CODE&gt;printf()&lt;/CODE&gt; format.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 01:05:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72930#M14905</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-04-06T01:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72931#M14906</link>
      <description>&lt;P&gt;I understand that, but I don't understand what you're eluding to.  when I read docs on TIME_FORMAT, they reference using strptime() formatting.  So I did.  I, obviously, made a mistake with the tab &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  The dashes are still confusing me.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 03:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72931#M14906</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-06T03:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone calculation error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72932#M14907</link>
      <description>&lt;P&gt;I have confirmed that the TIME_FORMAT listed above is working correctly.  It was subtle, but I see the I had messed up the month detection at least.  I was using the hyphens because I read the documentation incorrectly, thinking that I needed the hyphen to detect the lack of 0 padded integers. That wasn't the case at all.  I see now that you probably just thought i had the hyphens in the wrong spot! Which, in the long run I did because of my misunderstanding.  Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 09:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-calculation-error/m-p/72932#M14907</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2011-04-06T09:14:43Z</dc:date>
    </item>
  </channel>
</rss>

