<?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: Incorrect event time in Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136668#M28158</link>
    <description>&lt;P&gt;Perfect, have now (finally) gotten around to testing this approach and it works great. I'd assume that this would only work if all sourcetypes (if set by sourcetype) would need to be on the same time zone for this to work effectively... is there not a method for determining the time by inspecting the time field and including the timezone in the timestamp of the event (log4j-based)&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2014 14:42:06 GMT</pubDate>
    <dc:creator>brettcave</dc:creator>
    <dc:date>2014-01-02T14:42:06Z</dc:date>
    <item>
      <title>Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136662#M28152</link>
      <description>&lt;P&gt;Hi, we recently changed platforms that we host some of our services on, and one of the changes included switching from a localized time on the server to UTC. Now, in Splunk, our times are all wrong.&lt;/P&gt;

&lt;P&gt;I have a splunk forwarder installed on a host. If I check the date on servers, this is what I get:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkforwarder$ date
Mon Nov 11 13:37:35 UTC 2013

splunkindexer$ date
Mon Nov 11 08:37:45 EST 2013
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The events being sent from the forwarder to the indexer look like this (sent 5 minutes before checking the server time):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Nov 11 13:29:57 127.0.0.1 Nov 11 13:29:57 ..... | ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, the Splunk indexer is marketing the time on the events as if the UTC time was the EST time, and rendering it locally (I am currently in a GMT+2 timezone, and my Splunk account is configured as such), so the events are marked as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11/11/13 8:29:57.000 PM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which is what time it would be in my current time zone if it was 13:29 EST. Where is the time misinterpretation happening? On the source of the events (a java app), the splunk forwarder, or the splunk indexer? &lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2013 13:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136662#M28152</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2013-11-11T13:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136663#M28153</link>
      <description>&lt;P&gt;Time on Forwarder (after switching to UTC):"Mon Nov 11 13:37:35 UTC 2013"&lt;BR /&gt;
Time of Splunk Indexer:"Mon Nov 11 08:37:45 EST 2013"&lt;/P&gt;

&lt;P&gt;Time on the logs (send from forwarder) sent at "Mon Nov 11 13:29:35 UTC 2013": Nov 11 13:29:57 [this is correct as its same time as time on forwarder.].&lt;BR /&gt;
At this time, time on Splunk Indexer will be: "Mon Nov 11 08:37:45 EST 2013" which is same as what is shown as log's index time. I don't see any issue with interpretation.&lt;/P&gt;

&lt;P&gt;Let me know if my understanding is incorrect.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2013 16:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136663#M28153</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-11T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136664#M28154</link>
      <description>&lt;P&gt;To investigate timezone issue, a good approach is use a search like this one&lt;BR /&gt;
&lt;CODE&gt;source=mysource host=myhost | convert ctime(_indextime) AS indextime | delay =_indextime-_time | table _time indextime date_zone host source sourcetype _raw&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;try alltime, and try realtime-alltime.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2013 17:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136664#M28154</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-11-11T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136665#M28155</link>
      <description>&lt;P&gt;Thanks for that yannK. Here's a sample of the data - all offsets are 18000.&lt;/P&gt;

&lt;P&gt;_time                   indextime    delay  date_zone&lt;BR /&gt;
11/13/13 5:54:06.000 PM 11/13/2013 12:54:04 -18002  local&lt;BR /&gt;
11/13/13 5:38:44.000 PM 11/13/2013 12:38:42 -18002  local&lt;BR /&gt;
11/13/13 5:32:55.000 PM 11/13/2013 12:32:54 -18001  local&lt;BR /&gt;
11/13/13 5:32:54.000 PM 11/13/2013 12:33:04 -17990  local&lt;BR /&gt;
11/13/13 5:32:54.000 PM 11/13/2013 12:32:54 -18000  local&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136665#M28155</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2020-09-28T15:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136666#M28156</link>
      <description>&lt;P&gt;The times on the servers are right, but the indexer is parsing the UTC time on the forwarder as if it were EST. An event that occurred at 13h29m57s UTC is being reported by Splunk at 8:29:57PM GMT+2 (aka 6:29pm or 18h29 GMT) - it's 5 hours off.&lt;/P&gt;

&lt;P&gt;If I change my user profile's time zone in Splunk to GMT, the lcoalized time is still off.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 11:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136666#M28156</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2013-11-13T11:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136667#M28157</link>
      <description>&lt;P&gt;So the issue is pretty much the 5h difference between UTC (the forwarder) and EST (the indexer).&lt;/P&gt;

&lt;P&gt;You have to enforce the timezone for this particular log in props.conf on the indexer. Using the more appropriate rule&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;by sourcetype&lt;BR /&gt;
[mysourcetype]&lt;BR /&gt;
TZ=UTC&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;by source&lt;BR /&gt;
[source::...mysource]&lt;BR /&gt;
TZ=UTC&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;by host&lt;BR /&gt;
[host:myforwarder]&lt;BR /&gt;
TZ=UTC&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 13 Nov 2013 16:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136667#M28157</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-11-13T16:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect event time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136668#M28158</link>
      <description>&lt;P&gt;Perfect, have now (finally) gotten around to testing this approach and it works great. I'd assume that this would only work if all sourcetypes (if set by sourcetype) would need to be on the same time zone for this to work effectively... is there not a method for determining the time by inspecting the time field and including the timezone in the timestamp of the event (log4j-based)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2014 14:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Incorrect-event-time-in-Splunk/m-p/136668#M28158</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2014-01-02T14:42:06Z</dc:date>
    </item>
  </channel>
</rss>

