<?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: Convert time to another timezone then remove timezone identifier in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357575#M65294</link>
    <description>&lt;P&gt;You can use below configuration in props.conf on Search head. In below configuration &lt;CODE&gt;field1&lt;/CODE&gt; contains actual timestamp and it will create new field with name &lt;CODE&gt;new_field&lt;/CODE&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
EVAL-new_field = strftime(strptime(field1,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT:  You need to repeat same config for 23 times so something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
EVAL-new_field1 = strftime(strptime(field1,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
EVAL-new_field2 = strftime(strptime(field2,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
.........
.........
EVAL-new_field23 = strftime(strptime(field23,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Dec 2017 08:20:02 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2017-12-27T08:20:02Z</dc:date>
    <item>
      <title>Convert time to another timezone then remove timezone identifier</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357571#M65290</link>
      <description>&lt;P&gt;So I have multiple fields that have time value that looks like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-10-05T16:00:00Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want is to convert it to GMT+8 then remove the extra parts and retain just the date instead using props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-10-06
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;10-5 UTC converted to GMT+8 is 10-6&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 06:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357571#M65290</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2017-12-27T06:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert time to another timezone then remove timezone identifier</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357572#M65291</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you please try below sample query (First line is used to generate dummy data)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval field1="2017-10-05T16:00:00Z" 
| eval new_field=strftime(strptime(field1,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have created above query for single field only, if you have multiple field then you need to repeat for each field.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357572#M65291</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-27T07:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert time to another timezone then remove timezone identifier</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357573#M65292</link>
      <description>&lt;P&gt;It work but I'm trying looking at using props.conf as there is 23 fields to be exact that I need to convert.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357573#M65292</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2017-12-27T07:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert time to another timezone then remove timezone identifier</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357574#M65293</link>
      <description>&lt;P&gt;Hi michaelrosello,&lt;/P&gt;

&lt;P&gt;Please check below link. It will help you.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/320021/how-do-i-set-timezone-properly-in-propsconf.html"&gt;https://answers.splunk.com/answers/320021/how-do-i-set-timezone-properly-in-propsconf.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357574#M65293</guid>
      <dc:creator>abhijeet01</dc:creator>
      <dc:date>2017-12-27T07:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert time to another timezone then remove timezone identifier</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357575#M65294</link>
      <description>&lt;P&gt;You can use below configuration in props.conf on Search head. In below configuration &lt;CODE&gt;field1&lt;/CODE&gt; contains actual timestamp and it will create new field with name &lt;CODE&gt;new_field&lt;/CODE&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
EVAL-new_field = strftime(strptime(field1,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT:  You need to repeat same config for 23 times so something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
EVAL-new_field1 = strftime(strptime(field1,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
EVAL-new_field2 = strftime(strptime(field2,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
.........
.........
EVAL-new_field23 = strftime(strptime(field23,"%Y-%m-%dT%H:%M:%SZ")+28800,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Dec 2017 08:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-time-to-another-timezone-then-remove-timezone-identifier/m-p/357575#M65294</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-27T08:20:02Z</dc:date>
    </item>
  </channel>
</rss>

