<?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: set timezone in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247180#M73728</link>
    <description>&lt;P&gt;The following will convert from the timezone of your user account to UTC.    You could use it in a subsearch to set earliest/latest in your search.&lt;/P&gt;

&lt;P&gt;| makeresults&lt;BR /&gt;
|  eval myTime=_time&lt;BR /&gt;
| eval showMyTime=strftime(myTime,"%H:%M")&lt;BR /&gt;
| eval myZone=strftime(myTime,"%z")&lt;BR /&gt;
| eval UTC=myTime-((myZone/100) *3600)&lt;BR /&gt;
| eval showUTC=strftime(UTC,"%H:%M")&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 20:51:21 GMT</pubDate>
    <dc:creator>rrice_splunk</dc:creator>
    <dc:date>2017-10-19T20:51:21Z</dc:date>
    <item>
      <title>set timezone in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247178#M73726</link>
      <description>&lt;P&gt;most of my data sets to UTC, and all data sources are properly tagged to convert to UTC if they are not.&lt;/P&gt;

&lt;P&gt;My user is in PST, so when I run a search such as @d etc, it starts from midnight PST. Usually this is ok, as dashboards are built with this in mind.&lt;/P&gt;

&lt;P&gt;I have an extra use case for monitoring our splunk license usage, Splunk however runs it's license metrics based on 0-24:00 UTC. Any search I run for "last day" is going to be off by 1/3 based on this time difference.&lt;/P&gt;

&lt;P&gt;Is there a way to set a specific search to ignore the associated users search head timezone setting and run in UTC (or other specification) on that search?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 20:27:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247178#M73726</guid>
      <dc:creator>GeorgeStarkey</dc:creator>
      <dc:date>2016-01-25T20:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: set timezone in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247179#M73727</link>
      <description>&lt;P&gt;Try something like in your searches to specify time range&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search [| gentimes start=-1  | eval UTCOffset=strptime(strftime(now(),"%m/%d/%Y %H:%M:%S")." UTC","%m/%d/%Y %H:%M:%S %Z") - now() | addinfo  | eval earliest=info_min_time+UTCOffset | eval latest=info_max_time+UTCOffset | table earliest latest | format "" "" "" "" "' ""] | rest of the search
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:01:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247179#M73727</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-25T21:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: set timezone in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247180#M73728</link>
      <description>&lt;P&gt;The following will convert from the timezone of your user account to UTC.    You could use it in a subsearch to set earliest/latest in your search.&lt;/P&gt;

&lt;P&gt;| makeresults&lt;BR /&gt;
|  eval myTime=_time&lt;BR /&gt;
| eval showMyTime=strftime(myTime,"%H:%M")&lt;BR /&gt;
| eval myZone=strftime(myTime,"%z")&lt;BR /&gt;
| eval UTC=myTime-((myZone/100) *3600)&lt;BR /&gt;
| eval showUTC=strftime(UTC,"%H:%M")&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 20:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/set-timezone-in-search/m-p/247180#M73728</guid>
      <dc:creator>rrice_splunk</dc:creator>
      <dc:date>2017-10-19T20:51:21Z</dc:date>
    </item>
  </channel>
</rss>

