<?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: Change timestamp of input data during indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339787#M62698</link>
    <description>&lt;P&gt;Thank you so much for such a prompt response. I tried this in props.conf, and it appears that splunk does not recognise time format any more after applying this conversion in props.conf for this sourcetype&lt;/P&gt;

&lt;P&gt;Could this be because of strftime converts timestamp to string? &lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 21:45:04 GMT</pubDate>
    <dc:creator>ashabc</dc:creator>
    <dc:date>2017-08-01T21:45:04Z</dc:date>
    <item>
      <title>Change timestamp of input data during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339785#M62696</link>
      <description>&lt;P&gt;I have a simple file that is generated by a script for which I do not have a control. The content of the file is like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "total": 15615
}
{
  "limit": 32250
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk can parse data well using sourcetype=json_no_timestamp&lt;BR /&gt;
As a default the timestamp for the indexed data is the current system time&lt;/P&gt;

&lt;P&gt;Is there a way I can modify the date time for this particular input (I am using file monitor)? I would like the date stamp to be 1 day behind than the current system time, as data in the file actually represents yesterday's information and not today's.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339785#M62696</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-29T15:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change timestamp of input data during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339786#M62697</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213523"&gt;@ashabc&lt;/a&gt;&lt;BR /&gt;
try this,&lt;/P&gt;

&lt;P&gt;you need to do this in the indexer&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[your sourcetypename]&lt;BR /&gt;
EVAL-newDate = _time&lt;BR /&gt;
EVAL-newDate1 = newDate - 86400&lt;BR /&gt;
EVAL-_time = strftime(newDate1,"%Y-%m-%d %H:%M:%S")&lt;/P&gt;

&lt;P&gt;I hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339786#M62697</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2020-09-29T15:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Change timestamp of input data during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339787#M62698</link>
      <description>&lt;P&gt;Thank you so much for such a prompt response. I tried this in props.conf, and it appears that splunk does not recognise time format any more after applying this conversion in props.conf for this sourcetype&lt;/P&gt;

&lt;P&gt;Could this be because of strftime converts timestamp to string? &lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 21:45:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339787#M62698</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2017-08-01T21:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change timestamp of input data during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339788#M62699</link>
      <description>&lt;P&gt;Actually I got it working using a search time modifier&lt;/P&gt;

&lt;P&gt;eval _time=_time-86400&lt;/P&gt;

&lt;P&gt;Thank you for pointing me to the right direction.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-timestamp-of-input-data-during-indexing/m-p/339788#M62699</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-29T15:11:12Z</dc:date>
    </item>
  </channel>
</rss>

