<?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 need help in time conversion in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471116#M80980</link>
    <description>&lt;P&gt;Currently am having a code that converts the time value to a formatted way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rename _time as Time_CST 
 | fieldformat Time_CST=strftime(Time_CST,"%x %X")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Raw timing format : 2020-04-10 15:28:30.333  (UTC)&lt;BR /&gt;
After adding the fieldformat : 04/10/20 10:28:30  (CST)&lt;/P&gt;

&lt;P&gt;all the timings are in UTC and CST zone&lt;BR /&gt;
Please help me convert this to IST time zone.&lt;BR /&gt;
How can i achieve it.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Apr 2020 15:32:18 GMT</pubDate>
    <dc:creator>jerinvarghese</dc:creator>
    <dc:date>2020-04-10T15:32:18Z</dc:date>
    <item>
      <title>need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471116#M80980</link>
      <description>&lt;P&gt;Currently am having a code that converts the time value to a formatted way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rename _time as Time_CST 
 | fieldformat Time_CST=strftime(Time_CST,"%x %X")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Raw timing format : 2020-04-10 15:28:30.333  (UTC)&lt;BR /&gt;
After adding the fieldformat : 04/10/20 10:28:30  (CST)&lt;/P&gt;

&lt;P&gt;all the timings are in UTC and CST zone&lt;BR /&gt;
Please help me convert this to IST time zone.&lt;BR /&gt;
How can i achieve it.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 15:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471116#M80980</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-04-10T15:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471117#M80981</link>
      <description>&lt;P&gt;Have you set your Splunk preferences to display times in IST?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 16:38:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471117#M80981</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-10T16:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471118#M80982</link>
      <description>&lt;P&gt;If you only want the time formatted in your results, then all you have to do is know your local offset in hours and apply it to the stored UTC value before you format. &lt;/P&gt;

&lt;P&gt;However, please please please get out of the habit of using a 2-digit year, and you will save yourself tons of headaches.  &lt;/P&gt;

&lt;P&gt;ISO standard is YYYY-MM-DD HH:MM:SS.QQQ.&lt;/P&gt;

&lt;P&gt;If your personal time zone were set to UTC, then your answer should look like this - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval Time_CST=strftime(_time-4*3600,"%Y-%m-%d %H:%M:%S.%3Q")
 | eval Time_IST=strftime(_time+5.5*3600,"%Y-%m-%d %H:%M:%S.%3Q")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your personal TZ were set to CST, then you need to offset by the difference between the two time zones -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval Time_CST=strftime(_time,"%Y-%m-%d %H:%M:%S.%3Q")
 | eval Time_IST=strftime(_time+9.5*3600,"%Y-%m-%d %H:%M:%S.%3Q")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Apr 2020 19:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471118#M80982</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-04-10T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471119#M80983</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;No, i dont have admin privilege to change anything in splunk.&lt;BR /&gt;
Any other conversion method in terms of query &lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 10:22:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471119#M80983</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-04-13T10:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471120#M80984</link>
      <description>&lt;P&gt;use &lt;CODE&gt;relative_time&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 12:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471120#M80984</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-13T12:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471121#M80985</link>
      <description>&lt;P&gt;You don't need admin privilege to change your personal time zone setting.  Click on your name at the top of the Splunk GUI and select Preferences.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 12:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471121#M80985</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-13T12:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471122#M80986</link>
      <description>&lt;P&gt;the answer is correct, but i have a problem. &lt;BR /&gt;
what i have to do during the Daylight saving time.&lt;/P&gt;

&lt;P&gt;CUrrently :   | eval Time_IST=strftime(_time+10.5*3600,"%d-%m-%Y %l:%M:%S %p")&lt;/P&gt;

&lt;P&gt;its 10.5 Multiplication factor.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471122#M80986</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-09-30T05:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: need help in time conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471123#M80987</link>
      <description>&lt;P&gt;Correct, you have the issue of daylight savings time, changing back and forth.  There is another answer somewhere ... where u showed the method of setting it up automatically to change itself...&lt;/P&gt;

&lt;P&gt;Ah, here it is. I haven't played with it in a long time, so test it thoroughly on different time frames to see whether it is appropriate to your need.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/4279/timezone-and-timestamp-modification-at-search-report-time.html"&gt;https://answers.splunk.com/answers/4279/timezone-and-timestamp-modification-at-search-report-time.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 18:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-time-conversion/m-p/471123#M80987</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-04-14T18:06:11Z</dc:date>
    </item>
  </channel>
</rss>

