<?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 stamp, incorrect date for later events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100902#M21124</link>
    <description>&lt;P&gt;From the posted link:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;For file sources, if no time or date can be identified in the file name, Splunk uses the file's modification time.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if you can remove the date string from the the CSV filename, fix the file naming/rotation, or (preferred) get the date entered into the log file, then you should be good to go &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jul 2012 13:00:09 GMT</pubDate>
    <dc:creator>rturk</dc:creator>
    <dc:date>2012-07-17T13:00:09Z</dc:date>
    <item>
      <title>Time stamp, incorrect date for later events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100899#M21121</link>
      <description>&lt;P&gt;I am continuously indexing data from CSV file. Events only have time stamp without date. Splunk has automatically extracted time stamp and used file modified date to use it as date with in time stamp. Please find below example.&lt;BR /&gt;
FIELDS = "File", "Time", "Copy", "Open", "Save", "Close"&lt;/P&gt;

&lt;P&gt;3 » 16/07/2012 23:58:25.000  50K.xls   23:58:25    0.0156  0.7813  0.6719  0.0469 &lt;BR /&gt;
4 » 16/07/2012 23:58:19.000  50K.ppt   23:58:19    0.0156  0.9219  0.5625  0.0313 &lt;/P&gt;

&lt;P&gt;So if the next even arrives at 00:01:02, the splunk will assign it a date of 16/07/2012 instead of automatically detecting a day change and assign it date of 17/07/2012. Please can you help me to identify that how this problem can fixed.&lt;/P&gt;

&lt;P&gt;Please find below an examples where following events should have assigned date of 17/07/2012 but they were assigned incorrect date of 16/07/2012&lt;/P&gt;

&lt;P&gt;16/07/2012 00:09:02.000  500K.xls   00:09:02    0.0150  4.0161  1.4529  0.3600 &lt;BR /&gt;
3902 » 16/07/2012 00:08:52.000  500k.ppt   00:08:52    0.0160  5.9070  4.6250  0.0309 &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2012 11:29:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100899#M21121</guid>
      <dc:creator>atifshaukat</dc:creator>
      <dc:date>2012-07-17T11:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp, incorrect date for later events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100900#M21122</link>
      <description>&lt;P&gt;Hi atifshaukat,&lt;/P&gt;

&lt;P&gt;Just to clarify, your CSV looks something like this (spaced for readability), with no date entered into the events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;File,      Time,       Copy,   Open,   Save,   Close
50K.xls,   23:58:25,   0.0156, 0.7813, 0.6719, 0.0469 
50K.ppt,   23:58:19,   0.0156, 0.9219, 0.5625, 0.0313 
500K.xls,  00:09:02,   0.0150, 4.0161, 1.4529, 0.3600 
500k.ppt,  00:08:52,   0.0160, 5.9070, 4.6250, 0.0309 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will always trust the log file as a "source of truth" for the timestamp of an event. In the event that there is a time but no date in the event it will attempt to derive the date from the filename of the source or filename, so what is the filename of the CSV you are indexing?&lt;/P&gt;

&lt;P&gt;More information on how Splunk assigns timestamps may be found here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As a side note, I'd be looking at whatever is generating the log (whether that's a script, application, etc) to see whether the logging can be modified to include the date, or whether you can configure some kind of rollover at midnight where new events are written into a new CSV file (eg. file_operations_20120617.csv).&lt;/P&gt;

&lt;P&gt;Hope this has been of some help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100900#M21122</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2020-09-28T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp, incorrect date for later events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100901#M21123</link>
      <description>&lt;P&gt;Your assumptions are correct about csv. File name includes that so it is definitely extracting it from there. Is possible to use File modified time as a source?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2012 12:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100901#M21123</guid>
      <dc:creator>atifshaukat</dc:creator>
      <dc:date>2012-07-17T12:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp, incorrect date for later events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100902#M21124</link>
      <description>&lt;P&gt;From the posted link:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;For file sources, if no time or date can be identified in the file name, Splunk uses the file's modification time.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if you can remove the date string from the the CSV filename, fix the file naming/rotation, or (preferred) get the date entered into the log file, then you should be good to go &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2012 13:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100902#M21124</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2012-07-17T13:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp, incorrect date for later events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100903#M21125</link>
      <description>&lt;P&gt;Hi in my log event and filename date is not present i want give a fix date to log so what is do ?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 06:16:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-incorrect-date-for-later-events/m-p/100903#M21125</guid>
      <dc:creator>nitesh218ss</dc:creator>
      <dc:date>2015-05-12T06:16:38Z</dc:date>
    </item>
  </channel>
</rss>

