<?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: Time zone in TIME_FORMAT in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52200#M10027</link>
    <description>&lt;P&gt;After reading about %z on these pages and &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition&lt;/A&gt; , I found the python 3 documentation &lt;A href="https://docs.python.org/3/library/datetime.html"&gt;https://docs.python.org/3/library/datetime.html&lt;/A&gt; has this explanation:&lt;BR /&gt;
"&lt;BR /&gt;
%z  UTC offset in the form +HHMM or -HHMM (empty string if the object is naive).    (empty), +0000, -0400, +1030    (6)&lt;BR /&gt;
%Z  Time zone name (empty string if the object is naive).   (empty), UTC, EST, CST&lt;BR /&gt;&lt;BR /&gt;
"&lt;/P&gt;

&lt;P&gt;The documentation has been prompt updated to reflect this information correctly!&lt;BR /&gt;
Furthermore, the preview functionality mentioned is now part of the "add data"/data upload option in Splunk...&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 08:17:29 GMT</pubDate>
    <dc:creator>gjanders</dc:creator>
    <dc:date>2016-09-01T08:17:29Z</dc:date>
    <item>
      <title>Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52193#M10020</link>
      <description>&lt;P&gt;Given this timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01/Mar/2011:17:25:49.666+0000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the right format?&lt;BR /&gt;
I'm leaning towards:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %d/%b/%Y:$H:%M:%S.%3N+%z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I'm not quite sure what this means from the extended strptime documentation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%z, %::z, %:::z GNU libc support.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Mar 2011 02:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52193#M10020</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2011-03-02T02:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52194#M10021</link>
      <description>&lt;P&gt;Unfortunately we don't ship our "DateTimeTest" utility that allows easy testing of strptime/strftime functionality, please file an ER for that to be included from the CLI/UI. Here's my findings (first note that you have $H rather than %H):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ssorkin@MrT current]$ src/util/tests/DateTimeTest '%d/%b/%Y:%H:%M:%S.%3N+%z' '01/Mar/2011:17:25:49.666+0000'
01/Mar/2011:09:25:49.666+-0800
[ssorkin@MrT current]$ src/util/tests/DateTimeTest '%d/%b/%Y:%H:%M:%S.%3N%z' '01/Mar/2011:17:25:49.666+0000'
01/Mar/2011:09:25:49.666-0800
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So basically, %z does essentially the right thing, but the &lt;CODE&gt;+&lt;/CODE&gt; is unnecessary and actually causes wrong results.&lt;/P&gt;

&lt;P&gt;As a clarification, the &lt;CODE&gt;:&lt;/CODE&gt; in &lt;CODE&gt;%z&lt;/CODE&gt; says how to split the time zone offset. One &lt;CODE&gt;:&lt;/CODE&gt; looks like &lt;CODE&gt;-08:00&lt;/CODE&gt; for PST, two &lt;CODE&gt;:&lt;/CODE&gt; looks like &lt;CODE&gt;-08:00:00&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2011 02:58:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52194#M10021</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-03-02T02:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52195#M10022</link>
      <description>&lt;P&gt;Perfect. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2011 03:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52195#M10022</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2011-03-02T03:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52196#M10023</link>
      <description>&lt;P&gt;Actually, you should use the new preview feature (shipped in 4.3) to test any tz configs.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2012 19:39:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52196#M10023</guid>
      <dc:creator>emma</dc:creator>
      <dc:date>2012-04-25T19:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52197#M10024</link>
      <description>&lt;P&gt;%z is -0400  This format is not standard. if your machine is configure as Eastern Date Time&lt;/P&gt;

&lt;P&gt;%Z is EDT    if your machine is configure as Eastern Date Time, not too much use for storing it in data base.  By the way I live in New York.&lt;/P&gt;

&lt;P&gt;%:z is -04:00 That is the one most useful in hours and minutes.  It can be used across computer languages &lt;/P&gt;

&lt;P&gt;%::z is -04:00:00 It is over kill.  we don't need second for time zone&lt;/P&gt;

&lt;P&gt;%:::z is even more over kill, no use in reality &lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2012 19:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52197#M10024</guid>
      <dc:creator>peterzhoupeterz</dc:creator>
      <dc:date>2012-08-21T19:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52198#M10025</link>
      <description>&lt;P&gt;Actually, that's true.  Though actually, it was posted 2 years later.  &lt;/P&gt;

&lt;P&gt;Preview is great for manipulation &amp;amp; validation of timestamp extraction &lt;EM&gt;before&lt;/EM&gt; implementation.  &lt;/P&gt;

&lt;P&gt;Also:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition#Enhanced_strptime.28.29_support"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition#Enhanced_strptime.28.29_support&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 21:22:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52198#M10025</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2013-07-09T21:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52199#M10026</link>
      <description>&lt;P&gt;Rather than submitting yet another question about timestamp formating, could you please update your answer with the correct format string to successfully parse a timestamp like &lt;CODE&gt;2015-10-22T22:41:52.546249+00:00&lt;/CODE&gt;? I tried &lt;CODE&gt;%Y-%m-%dT%H:%M:%S.%6N%:z&lt;/CODE&gt;, but it doesn't seems to be working. The timezone info is probably not being captured as all event times are being translated as if the event timezone (always UTC) was the same as the splunk server (-0500), which, translated to my splunk user timezone (-0200), gives me &lt;CODE&gt;2015-10-23T01:41:52.546249-02:00&lt;/CODE&gt;. Any clue?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 23:06:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52199#M10026</guid>
      <dc:creator>blahblah</dc:creator>
      <dc:date>2015-10-22T23:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52200#M10027</link>
      <description>&lt;P&gt;After reading about %z on these pages and &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition&lt;/A&gt; , I found the python 3 documentation &lt;A href="https://docs.python.org/3/library/datetime.html"&gt;https://docs.python.org/3/library/datetime.html&lt;/A&gt; has this explanation:&lt;BR /&gt;
"&lt;BR /&gt;
%z  UTC offset in the form +HHMM or -HHMM (empty string if the object is naive).    (empty), +0000, -0400, +1030    (6)&lt;BR /&gt;
%Z  Time zone name (empty string if the object is naive).   (empty), UTC, EST, CST&lt;BR /&gt;&lt;BR /&gt;
"&lt;/P&gt;

&lt;P&gt;The documentation has been prompt updated to reflect this information correctly!&lt;BR /&gt;
Furthermore, the preview functionality mentioned is now part of the "add data"/data upload option in Splunk...&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 08:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52200#M10027</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2016-09-01T08:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52201#M10028</link>
      <description>&lt;P&gt;I made a request to ship your tool here:&lt;BR /&gt;
&lt;A href="https://ideas.splunk.com/ideas/EID-I-59"&gt;https://ideas.splunk.com/ideas/EID-I-59&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 23:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52201#M10028</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-02-23T23:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time zone in TIME_FORMAT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52202#M10029</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval time1="01/Mar/2011:17:25:49.666+0000" 
| appendpipe 
    [ eval time2="2015-10-22T22:41:52.546249+00:00"] 
| eval _time=coalesce(strptime(time2,"%FT%T.%6Q%:z"),strptime(time1,"%d/%B/%Y:%T.%3Q%z"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;on Splunk ver8.0.1&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;btool [options] {check|validate-strptime|validate-regex}&lt;/CODE&gt;&lt;BR /&gt;
Is this not enough?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 23:58:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-zone-in-TIME-FORMAT/m-p/52202#M10029</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-23T23:58:22Z</dc:date>
    </item>
  </channel>
</rss>

