<?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: Splunk Java SDK - query time range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36917#M8215</link>
    <description>&lt;P&gt;I am facing the same problem.  How did you fix it?  Can you please help us.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2015 17:29:18 GMT</pubDate>
    <dc:creator>skarthi98</dc:creator>
    <dc:date>2015-09-21T17:29:18Z</dc:date>
    <item>
      <title>Splunk Java SDK - help with query time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36913#M8211</link>
      <description>&lt;P&gt;I'm using Java SDK to query splunk. I'm getting proper results when I don't give time range to the search query. But when I specify time range I find that the results that are returned doesn't match the time that I give. It always returns the newest results irrespective of the date range that I specify.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Args outputArgs = new Args();&lt;BR /&gt;outputArgs.put("output_mode", outputMode);&lt;BR /&gt;outputArgs.put("earliest_time", "2013-07-29T12:00:00.000");&lt;BR /&gt;outputArgs.put("latest_time", "2013-07-30T12:00:00.000");&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I tried with relative time and also with the time format - %m/%d/%Y:%H:%M:%S (for this i receive a invalid earliest_time exception).Can you please let me know if the time format that I have specified is not proper. Or do I need to have some additional code to specify time range.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 05:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36913#M8211</guid>
      <dc:creator>arunstg1</dc:creator>
      <dc:date>2022-11-29T05:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36914#M8212</link>
      <description>&lt;P&gt;It could be that you need to specify timezone offset in the time string. Below is an example:&lt;/P&gt;

&lt;P&gt;2013-08-15T20:16:18.208-07:00&lt;/P&gt;

&lt;P&gt;"-07:00" is the offset of US Pacific time with Daylight Saving to UTC.&lt;/P&gt;

&lt;P&gt;To get an example of time format from your Splunk system, take a look on the value of _time field of an event. The above time string is from a _time field from my system.&lt;/P&gt;

&lt;P&gt;You can also specify a relative time, such as "-3d" (day) and "-3h" (hour).&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 03:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36914#M8212</guid>
      <dc:creator>ywu_splunk</dc:creator>
      <dc:date>2013-08-16T03:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36915#M8213</link>
      <description>&lt;P&gt;Thanks for the reply. Its still the same even after giving -08:00 offset. I'm getting only the latest generated log data. And for the _time attribute I'm also getting -07:00 offset.&lt;BR /&gt;
_time --&amp;gt; 2013-08-15T18:34:06.254-07:00&lt;BR /&gt;
Will I be missing anyother thing because of which the data is not getting filtered properly based on time.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 04:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36915#M8213</guid>
      <dc:creator>arunstg1</dc:creator>
      <dc:date>2013-08-16T04:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36916#M8214</link>
      <description>&lt;P&gt;You probably should use -7:00 offset. It is UC Pacific Daylight Saving time (I have modified my earlier comment to avoid confusion). That is what your _time attribute has. If it does not work, try the following to isolate the problem.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Issuing a search without time range.&lt;/LI&gt;
&lt;LI&gt;Take _time field value from an event from that search and specify the time range accordingly. Run the search again.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;You can set the earliest_time to be the same as the value of the event _time field, and latest_time to be a millisecond larger (Splunk requires latest_time to be larger than earliest_time).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36916#M8214</guid>
      <dc:creator>ywu_splunk</dc:creator>
      <dc:date>2020-09-28T14:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36917#M8215</link>
      <description>&lt;P&gt;I am facing the same problem.  How did you fix it?  Can you please help us.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 17:29:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36917#M8215</guid>
      <dc:creator>skarthi98</dc:creator>
      <dc:date>2015-09-21T17:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36918#M8216</link>
      <description>&lt;P&gt;Can you share your query.&lt;/P&gt;

&lt;P&gt;I want to run from 08/23/2015 00:00:00 to 09/22/2015 23:59:59&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 17:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/36918#M8216</guid>
      <dc:creator>skarthi98</dc:creator>
      <dc:date>2015-09-21T17:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Java SDK - query time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/622342#M216327</link>
      <description>&lt;P&gt;I also need answer for this question, product team, please suggest&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 05:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Java-SDK-help-with-query-time-range/m-p/622342#M216327</guid>
      <dc:creator>ansuhane</dc:creator>
      <dc:date>2022-11-29T05:29:23Z</dc:date>
    </item>
  </channel>
</rss>

