<?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 query timezone in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503093#M85706</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form hideTitle="false"&amp;gt;
  &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
  &amp;lt;init&amp;gt;
    &amp;lt;set token="showtab1"&amp;gt;first&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="time" token="time_finder" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Time Picker&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="earliestTime"&amp;gt;if(isstr(earliest), relative_time(now(),earliest),"-0d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime"&amp;gt;if(isstr(latest), relative_time(now(),latest), "-0d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime1"&amp;gt;relative_time(earliestTime,"-7d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime1"&amp;gt;relative_time(latestTime,"-7d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime2"&amp;gt;relative_time(earliestTime,"-14d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime2"&amp;gt;relative_time(latestTime,"-14d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime3"&amp;gt;relative_time(earliestTime,"-21d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime3"&amp;gt;relative_time(latestTime,"-21d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime4"&amp;gt;relative_time(earliestTime,"-28d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime4"&amp;gt;relative_time(latestTime,"-28d")&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel id="chartPanel3"&amp;gt;
      &amp;lt;title&amp;gt;IXN&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;chart 3&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal  (earliest=$earliestTime$ latest=$latestTime$) OR (earliest=$earliestTime1$ latest=$latestTime1$) OR (earliest=$earliestTime2$ latest=$latestTime2$) OR (earliest=$earliestTime3$ latest=$latestTime3$) OR (earliest=$earliestTime4$ latest=$latestTime4$)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$time_finder.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time_finder.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;chart 2&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=2 | streamstats count | eval _time=if((count == 2),relative_time('_time',"-12h"),relative_time('_time',"-5s")) | makecontinuous span=1m | eval count=(random() % 2)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal splunkd&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;full&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="maxLines"&amp;gt;5&amp;lt;/option&amp;gt;
        &amp;lt;option name="raw.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.sortDirection"&amp;gt;asc&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="type"&amp;gt;raw&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's like this.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 13:35:53 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2019-12-11T13:35:53Z</dc:date>
    <item>
      <title>Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503088#M85701</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;I have the following query in splunk and I need it to look like gmt-3.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="raw_altitude_or8" "The counter total_idle_inst" | stats count as Erro
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The result of this query brings me the following value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(2019-12-09 10:30:52.271)           (2019-12-09 08:06:09.840)
sql.oci.exe.13472 (trace:0) (calcInstCounter): Error[525] -&amp;gt; The counter total_idle_inst should not be negative, correcting...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However I would like the search to return this field with the date &lt;STRONG&gt;2019-12-09 07:30:52.271&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I know how to do this by changing it directly in props.conf, but for the moment it is not feasible.&lt;/P&gt;

&lt;P&gt;I would like to change the time within the query itself.&lt;/P&gt;

&lt;P&gt;Is there such a possibility?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 19:01:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503088#M85701</guid>
      <dc:creator>leandromatperei</dc:creator>
      <dc:date>2019-12-10T19:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503089#M85702</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw=" (2019-12-09 10:30:52.271)           (2019-12-09 08:06:09.840)
 sql.oci.exe.13472 (trace:0) (calcInstCounter): Error[525] -&amp;gt; The counter total_idle_inst should not be negative, correcting..."
| rex "(?&amp;lt;date&amp;gt;\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})"
| eval _time=relative_time(strptime(date,"%Y-%m-%d %T"),"-3h")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, try and check &lt;CODE&gt;_time&lt;/CODE&gt; .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="raw_altitude_or8" "The counter total_idle_inst"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if &lt;CODE&gt;_time&lt;/CODE&gt; of the result is UTC,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=relative_time(_time,"-3h")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is OK. &lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 20:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503089#M85702</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-10T20:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503090#M85703</link>
      <description>&lt;P&gt;Thanks for the answer.&lt;/P&gt;

&lt;P&gt;However I had a problem, when searching for the time using earliest and latest, the results do not bring the time period entered by _time, and yes what is inside the event.&lt;/P&gt;

&lt;P&gt;I would like to pick up the events between 2 and 3 pm with the _time and not by the event time.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 12:19:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503090#M85703</guid>
      <dc:creator>leandromatperei</dc:creator>
      <dc:date>2019-12-11T12:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503091#M85704</link>
      <description>&lt;P&gt;The value of earliest cannot be changed unless it is made a dashboard.&lt;/P&gt;

&lt;P&gt;If you only do search, search and narrow down&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 12:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503091#M85704</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-11T12:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503092#M85705</link>
      <description>&lt;P&gt;And what would it be like on a dashboard?&lt;/P&gt;

&lt;P&gt;I would like to include this research in the dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 13:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503092#M85705</guid>
      <dc:creator>leandromatperei</dc:creator>
      <dc:date>2019-12-11T13:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change query timezone</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503093#M85706</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form hideTitle="false"&amp;gt;
  &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
  &amp;lt;init&amp;gt;
    &amp;lt;set token="showtab1"&amp;gt;first&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="time" token="time_finder" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Time Picker&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="earliestTime"&amp;gt;if(isstr(earliest), relative_time(now(),earliest),"-0d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime"&amp;gt;if(isstr(latest), relative_time(now(),latest), "-0d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime1"&amp;gt;relative_time(earliestTime,"-7d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime1"&amp;gt;relative_time(latestTime,"-7d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime2"&amp;gt;relative_time(earliestTime,"-14d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime2"&amp;gt;relative_time(latestTime,"-14d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime3"&amp;gt;relative_time(earliestTime,"-21d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime3"&amp;gt;relative_time(latestTime,"-21d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="earliestTime4"&amp;gt;relative_time(earliestTime,"-28d")&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="latestTime4"&amp;gt;relative_time(latestTime,"-28d")&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel id="chartPanel3"&amp;gt;
      &amp;lt;title&amp;gt;IXN&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;chart 3&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal  (earliest=$earliestTime$ latest=$latestTime$) OR (earliest=$earliestTime1$ latest=$latestTime1$) OR (earliest=$earliestTime2$ latest=$latestTime2$) OR (earliest=$earliestTime3$ latest=$latestTime3$) OR (earliest=$earliestTime4$ latest=$latestTime4$)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$time_finder.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time_finder.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;chart 2&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=2 | streamstats count | eval _time=if((count == 2),relative_time('_time',"-12h"),relative_time('_time',"-5s")) | makecontinuous span=1m | eval count=(random() % 2)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal splunkd&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;full&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="maxLines"&amp;gt;5&amp;lt;/option&amp;gt;
        &amp;lt;option name="raw.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.sortDirection"&amp;gt;asc&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="type"&amp;gt;raw&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's like this.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 13:35:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Change-query-timezone/m-p/503093#M85706</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-11T13:35:53Z</dc:date>
    </item>
  </channel>
</rss>

