<?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: How do I pass a specific time to a search run with the Python SDK? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248916#M3118</link>
    <description>&lt;P&gt;Ah. Fantastic, thanks.  That was the error preventing it from running...Any idea why it doesn't stop at the specified latest value, "now"?.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2017 13:15:30 GMT</pubDate>
    <dc:creator>anshanno</dc:creator>
    <dc:date>2017-01-23T13:15:30Z</dc:date>
    <item>
      <title>How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248914#M3116</link>
      <description>&lt;P&gt;I have read the time modifier documentation here: &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.5.1612/SearchReference/SearchTimeModifiers#_time_and__indextime_fields"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.5.1612/SearchReference/SearchTimeModifiers#_time_and__indextime_fields&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs_export = {"earliest_time": "10/5/2016:20:00:00",
                 "latest_time": "now",
                 "search_mode": "normal"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what I am passing for my search.  I copy and pasted the date format exactly as it is in the documentation and I am getting the below error.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunklib.binding.HTTPError: HTTP 400 Bad Request -- Invalid earliest_time.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something?  Any help is greatly appreciated!  Thanks!&lt;/P&gt;

&lt;P&gt;EDIT:&lt;/P&gt;

&lt;P&gt;For those in the future looking for the answer, example below will work as expected.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs_export = {"earliest_time": "2017-01-24T07:20:38.000-05:00",
                 "latest_time": "now",
                 "search_mode": "normal"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Jan 2017 21:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248914#M3116</guid>
      <dc:creator>anshanno</dc:creator>
      <dc:date>2017-01-21T21:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248915#M3117</link>
      <description>&lt;P&gt;To my knowledge there isn't an earliest_time or latest_time.  Instead I believe you should be using earliest and latest without _time appended.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248915#M3117</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T12:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248916#M3118</link>
      <description>&lt;P&gt;Ah. Fantastic, thanks.  That was the error preventing it from running...Any idea why it doesn't stop at the specified latest value, "now"?.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248916#M3118</guid>
      <dc:creator>anshanno</dc:creator>
      <dc:date>2017-01-23T13:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248917#M3119</link>
      <description>&lt;P&gt;When I want "now" in splunk i typically use "now()".  Have you tried that?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248917#M3119</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-01-23T15:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248918#M3120</link>
      <description>&lt;P&gt;Whoops, I meant specified earliest value.  It doesn't stop returning log files when the search reaches the specified earliest value.  That was my mistake.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 16:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248918#M3120</guid>
      <dc:creator>anshanno</dc:creator>
      <dc:date>2017-01-23T16:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248919#M3121</link>
      <description>&lt;P&gt;Does earliest=now() work?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 21:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248919#M3121</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-01-23T21:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass a specific time to a search run with the Python SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248920#M3122</link>
      <description>&lt;P&gt;Apparently with the python SDK you need to specify the time in UTC format.  That was my issue.  Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 13:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-pass-a-specific-time-to-a-search-run-with-the-Python/m-p/248920#M3122</guid>
      <dc:creator>anshanno</dc:creator>
      <dc:date>2017-01-24T13:53:08Z</dc:date>
    </item>
  </channel>
</rss>

