<?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 What does &amp;lt;time_unit&amp;gt; default to? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630140#M218915</link>
    <description>&lt;P&gt;Because of a typo we had the following in our query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-1@d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since Splunk query actually ran I assumed that some kind of default value had been used.&lt;/P&gt;&lt;P&gt;I could not find such details in docs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 15:20:38 GMT</pubDate>
    <dc:creator>pm771</dc:creator>
    <dc:date>2023-02-08T15:20:38Z</dc:date>
    <item>
      <title>What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630140#M218915</link>
      <description>&lt;P&gt;Because of a typo we had the following in our query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-1@d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since Splunk query actually ran I assumed that some kind of default value had been used.&lt;/P&gt;&lt;P&gt;I could not find such details in docs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 15:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630140#M218915</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2023-02-08T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630144#M218917</link>
      <description>&lt;P&gt;Time is stored in seconds so -1 is previous second (from now),&amp;nbsp; @d will align to the beginning of the day, so&lt;A href="mailto:-1@d" target="_blank"&gt;-1@d&lt;/A&gt;&amp;nbsp;is midnight last night unless you run the search within the first second of today, in which case it will be midnight on the previous night.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630144#M218917</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-08T16:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630146#M218918</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You are correct in identifying its behavior. When you write earliest=-1@d, it gives you the results on the basis of&amp;nbsp;@d, which is every single result from the beginning of the day. -1 as ITWhisperer correctly pointed out accounts for a second and has no visible impact.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shivanshu1593_0-1675872547023.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23784i0843080F2CA31A92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shivanshu1593_0-1675872547023.png" alt="shivanshu1593_0-1675872547023.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630146#M218918</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2023-02-08T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630147#M218919</link>
      <description>&lt;P&gt;As I said, -1 is not ignored, it is just that it has no appreciable impact, unless going back 1 second takes you back to the previous day. Essentially, without a time unit, seconds is assumed / defaulted.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630147#M218919</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-08T16:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630149#M218920</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Thank you for correcting me and letting us know the correct behavior. I didn't know the correct fact here. I've updated the answer as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630149#M218920</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2023-02-08T16:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: What does &lt;time_unit&gt; default to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630194#M218939</link>
      <description>&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= 
earliest=-600@m
| stats max(_time) as maxT min(_time) as minT
| eval maxtime=strftime(maxT,"%Y-%m-%dT%H:%M:%S.%Q"), mintime=strftime(minT,"%Y-%m-%dT%H:%M:%S.%Q")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and got back 10 min of events as expected &lt;FONT color="#008080"&gt;based on your explanation&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 22:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-lt-time-unit-gt-default-to/m-p/630194#M218939</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2023-02-08T22:50:24Z</dc:date>
    </item>
  </channel>
</rss>

