<?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: How to change the time format before or while logs are being parsed? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200127#M39574</link>
    <description>&lt;P&gt;I think that &lt;CODE&gt;Z&lt;/CODE&gt; is probably &lt;CODE&gt;Zulu&lt;/CODE&gt; which means &lt;CODE&gt;GMT&lt;/CODE&gt; (&lt;CODE&gt;UTC&lt;/CODE&gt;).  You should use this (with no TZ config):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S%6N%z
TZ_ALIAS = Z=UTC
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Jun 2016 05:33:42 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-06-09T05:33:42Z</dc:date>
    <item>
      <title>How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200122#M39569</link>
      <description>&lt;P&gt;I have a database log that comes in with a time stamp which is used by Splunk as the time stamp. However, I noticed the time is in UTC which is neither my time zone nor the time zone the server is in, but somehow the Database admin can't change the time reported in the raw log.&lt;/P&gt;

&lt;P&gt;Is there a way to have Splunk convert the time to MST or its own time zone that matches that of my other logs? Can I put this in the props.conf file so it's done on the indexers before the logs are searched?&lt;/P&gt;

&lt;P&gt;What command/string can I put in the props.conf file to make this change?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:01:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200122#M39569</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-06-07T18:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200123#M39570</link>
      <description>&lt;P&gt;There is no reason to do this.  Splunk internally normalizes all times to UTC anyway.  Furthermore, it re-normalizes them to &lt;EM&gt;your&lt;/EM&gt; configured user &lt;CODE&gt;Time zone&lt;/CODE&gt; setting whenever you interact with Splunk.  Therefore, as long as you have configured &lt;CODE&gt;TZ&lt;/CODE&gt; correctly in &lt;CODE&gt;props.conf&lt;/CODE&gt; and also your &lt;CODE&gt;Edit Account&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Time zone&lt;/CODE&gt; setting, everything should be handled seamlessly as you would like it to.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200123#M39570</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-07T18:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200124#M39571</link>
      <description>&lt;P&gt;How do you configure TZ in Props, is it;&lt;/P&gt;

&lt;P&gt;TZ = US/Mountain&lt;/P&gt;

&lt;P&gt;Can I also get Splunk to ignore the time stamp in the log and use the time it received the log as the time stamp?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 20:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200124#M39571</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-06-07T20:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200125#M39572</link>
      <description>&lt;P&gt;That setting is correctly formatted but keep in mind that it does not CHANGE anything, it informs the indexer what TZ to apply to the time found inside those events (if there is no TZ attached to the timestamp inside the event).  You can get Splunk to use &lt;CODE&gt;_indextime&lt;/CODE&gt; as the timestamp with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jun 2016 05:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200125#M39572</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-08T05:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200126#M39573</link>
      <description>&lt;P&gt;Thanks Woodcock.&lt;/P&gt;

&lt;P&gt;After looking at the logs, it appears there is no TZ attached to the timestamp. Here is what the timestamp in the log look like;&lt;/P&gt;

&lt;P&gt;2016-06-08T18:01:36.293126Z&lt;/P&gt;

&lt;P&gt;Looking at this setting, do you think I need to add "TZ = UTC" to the props.conf file?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200126#M39573</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-06-08T20:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the time format before or while logs are being parsed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200127#M39574</link>
      <description>&lt;P&gt;I think that &lt;CODE&gt;Z&lt;/CODE&gt; is probably &lt;CODE&gt;Zulu&lt;/CODE&gt; which means &lt;CODE&gt;GMT&lt;/CODE&gt; (&lt;CODE&gt;UTC&lt;/CODE&gt;).  You should use this (with no TZ config):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S%6N%z
TZ_ALIAS = Z=UTC
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jun 2016 05:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-time-format-before-or-while-logs-are-being/m-p/200127#M39574</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-09T05:33:42Z</dc:date>
    </item>
  </channel>
</rss>

