<?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: Strftime adds 1 hour after converting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345768#M102429</link>
    <description>&lt;P&gt;Hi damien_chillet,  I managed to get a desired value by following your suggestion, but now I get a result as 09:11:00.000000 instead of 09:11:00&lt;/P&gt;

&lt;P&gt;I am trying to calculate difference between 2 time ranges   3/27/2018 14:01 and 3/27/2018 23:12.&lt;/P&gt;

&lt;P&gt;am I missing something?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 15:38:28 GMT</pubDate>
    <dc:creator>pheonix101</dc:creator>
    <dc:date>2018-06-14T15:38:28Z</dc:date>
    <item>
      <title>Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345764#M102425</link>
      <description>&lt;P&gt;I'm working on identifying which hosts are located in which time zone as the client does not have an inventory list and they have devices all around the globe.&lt;BR /&gt;
I'm calculating the difference between the _time that was extracted from the log and _indextime to establish the difference between them, which will be a good indication of how many time zones the devices is away. &lt;BR /&gt;
I get values of ranges around 0-15, around 3600 and around 7200, which is expected. &lt;BR /&gt;
Now when I try to use strftime to express that difference into a readable format it always adds 1 hour to it. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 14:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345764#M102425</guid>
      <dc:creator>MedralaG</dc:creator>
      <dc:date>2018-04-16T14:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345765#M102426</link>
      <description>&lt;P&gt;Don't use strftime to deal with durations, use the following (where diff is your difference value in seconds):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval diff=tostring(diff, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Apr 2018 14:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345765#M102426</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-16T14:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345766#M102427</link>
      <description>&lt;P&gt;Nice one, thank you. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345766#M102427</guid>
      <dc:creator>MedralaG</dc:creator>
      <dc:date>2018-04-16T15:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345767#M102428</link>
      <description>&lt;P&gt;You welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 16:05:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345767#M102428</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-16T16:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345768#M102429</link>
      <description>&lt;P&gt;Hi damien_chillet,  I managed to get a desired value by following your suggestion, but now I get a result as 09:11:00.000000 instead of 09:11:00&lt;/P&gt;

&lt;P&gt;I am trying to calculate difference between 2 time ranges   3/27/2018 14:01 and 3/27/2018 23:12.&lt;/P&gt;

&lt;P&gt;am I missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 15:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345768#M102429</guid>
      <dc:creator>pheonix101</dc:creator>
      <dc:date>2018-06-14T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345769#M102430</link>
      <description>&lt;P&gt;Hi damien_chillet,&lt;/P&gt;

&lt;P&gt;i managed to get a desired result by following your suggestion, &lt;/P&gt;

&lt;P&gt;I am trying to calculate difference between 2 time ranges 3/27/2018 14:01 and   3/27/2018 23:12, but I get a result as 09:11:00.000000 instead of 09:11:00&lt;/P&gt;

&lt;P&gt;query: &lt;/P&gt;

&lt;P&gt;index=myindex| eval submit=strptime(in, "%m/%d/%Y %H:%M") | eval response=strptime(out, "%m/%d/%Y %H:%M") | eval Total=response-submit | eval Ntotal=tostring(Total,"duration") &lt;/P&gt;

&lt;P&gt;please advise.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 15:42:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345769#M102430</guid>
      <dc:creator>pheonix101</dc:creator>
      <dc:date>2018-06-14T15:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345770#M102431</link>
      <description>&lt;P&gt;whats is your string?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 08:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345770#M102431</guid>
      <dc:creator>MedralaG</dc:creator>
      <dc:date>2018-06-15T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345771#M102432</link>
      <description>&lt;P&gt;time ranges 3/27/2018 14:01 and 3/27/2018 23:12&lt;/P&gt;

&lt;P&gt;index=myindex| eval submit=strptime(in, "%m/%d/%Y %H:%M") | eval response=strptime(out, "%m/%d/%Y %H:%M") | eval Total=response-submit | eval Ntotal=tostring(Total,"duration")&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 08:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345771#M102432</guid>
      <dc:creator>pheonix101</dc:creator>
      <dc:date>2018-06-15T08:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345772#M102433</link>
      <description>&lt;P&gt;hmm, interesting, without spending too much time looking into why it's giving you .0000 you can just do a round command on the Total eval to get rid of those , so:&lt;/P&gt;

&lt;P&gt;| eval Total=round(response-submit,0)&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 08:47:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345772#M102433</guid>
      <dc:creator>MedralaG</dc:creator>
      <dc:date>2018-06-15T08:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345773#M102434</link>
      <description>&lt;P&gt;That did the trick. Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 11:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345773#M102434</guid>
      <dc:creator>pheonix101</dc:creator>
      <dc:date>2018-06-15T11:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Strftime adds 1 hour after converting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345774#M102435</link>
      <description>&lt;P&gt;I am still trying to learn more about splunk functionality, any suggestions on learning Splunk commands (video guides/reference materials) would be helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 11:31:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strftime-adds-1-hour-after-converting/m-p/345774#M102435</guid>
      <dc:creator>pheonix101</dc:creator>
      <dc:date>2018-06-15T11:31:02Z</dc:date>
    </item>
  </channel>
</rss>

