<?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: API: How to specify returning dates with a UTC or GMT offset rather than a CDT time zone? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436780#M124458</link>
    <description>&lt;P&gt;Thanks for the answer, this helped alot, However is there a way for _time to assume that value? Because if not it creates an extra variable called formatted that contains the formatted date.&lt;BR /&gt;
I would like a workaround but if not possible I can live with that. &lt;BR /&gt;
I will try renaming in the mean time and see what happens&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 15:19:38 GMT</pubDate>
    <dc:creator>artrune</dc:creator>
    <dc:date>2019-06-21T15:19:38Z</dc:date>
    <item>
      <title>API: How to specify returning dates with a UTC or GMT offset rather than a CDT time zone?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436778#M124456</link>
      <description>&lt;P&gt;How can I specify Splunk to return dates with a UTC or GMT offset rather than a time zone abbreviation?&lt;BR /&gt;
Right now I get back information like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"preview":false,"offset":31,"result":{"_time":"2019-06-17 17:30:00.000 CDT","Value":"97.038000"}}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to have a UTC offset instead of the time zone abbreviation CDT.&lt;/P&gt;

&lt;P&gt;Any clues?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 00:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436778#M124456</guid>
      <dc:creator>artrune</dc:creator>
      <dc:date>2019-06-21T00:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: API: How to specify returning dates with a UTC or GMT offset rather than a CDT time zone?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436779#M124457</link>
      <description>&lt;P&gt;@artrune ,&lt;/P&gt;

&lt;P&gt;You can use &lt;CODE&gt;%z&lt;/CODE&gt; in the time format &lt;/P&gt;

&lt;P&gt;Reference  : &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Commontimeformatvariables#Time_variables"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Commontimeformatvariables#Time_variables&lt;/A&gt;&lt;BR /&gt;
E.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval formatted=strftime(_time,"%d-%m-%Y %H:%M:%S %z")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jun 2019 01:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436779#M124457</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-06-21T01:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: API: How to specify returning dates with a UTC or GMT offset rather than a CDT time zone?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436780#M124458</link>
      <description>&lt;P&gt;Thanks for the answer, this helped alot, However is there a way for _time to assume that value? Because if not it creates an extra variable called formatted that contains the formatted date.&lt;BR /&gt;
I would like a workaround but if not possible I can live with that. &lt;BR /&gt;
I will try renaming in the mean time and see what happens&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 15:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436780#M124458</guid>
      <dc:creator>artrune</dc:creator>
      <dc:date>2019-06-21T15:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: API: How to specify returning dates with a UTC or GMT offset rather than a CDT time zone?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436781#M124459</link>
      <description>&lt;P&gt;@artrune , yes you can directly assign the converted values to _time instead of an extra variable ,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval _time=strftime(_time,"%d-%m-%Y %H:%M:%S %z")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, its advised not to change _time, especially if you are using it for any other operation in the search.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2019 02:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/API-How-to-specify-returning-dates-with-a-UTC-or-GMT-offset/m-p/436781#M124459</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-06-22T02:01:16Z</dc:date>
    </item>
  </channel>
</rss>

