<?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: Timestamp difference in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266198#M96415</link>
    <description>&lt;P&gt;Since the timezone is not referenced in the timestamp coming from the database, I suggest adjusting the query to modify the date.&lt;/P&gt;

&lt;P&gt;If this is SQL you can use something like this:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/ms186819.aspx"&gt;https://msdn.microsoft.com/en-us/library/ms186819.aspx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;SELECT DATEADD(hour, +4, DATEADD(second, yourTimeStampColumn, '1970-01-01'))&lt;/P&gt;

&lt;P&gt;or maybe the + is not required.  I'm not a SQL DBA, but I did stay at a holiday inn express last night &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2016 16:11:03 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2016-09-06T16:11:03Z</dc:date>
    <item>
      <title>Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266197#M96414</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1807iF2DC71693119C83C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Index time 4 hours behind the actual timestamp of the database row we are pulling in as event. This is resulting in wrong Order Line count for events which are created between midnight 12 through 4 AM. &lt;/P&gt;

&lt;P&gt;Here is an example: Looks at &lt;BR /&gt;
• Index Time: 9/1/2016 12:21:36 PM&lt;BR /&gt;
• OrderEntryDate: 2016-09-01 16:21:35 &lt;/P&gt;

&lt;P&gt;Can you anyone suggest me how can i change the index time _time as Order Entry Date?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 16:03:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266197#M96414</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-09-06T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266198#M96415</link>
      <description>&lt;P&gt;Since the timezone is not referenced in the timestamp coming from the database, I suggest adjusting the query to modify the date.&lt;/P&gt;

&lt;P&gt;If this is SQL you can use something like this:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/ms186819.aspx"&gt;https://msdn.microsoft.com/en-us/library/ms186819.aspx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;SELECT DATEADD(hour, +4, DATEADD(second, yourTimeStampColumn, '1970-01-01'))&lt;/P&gt;

&lt;P&gt;or maybe the + is not required.  I'm not a SQL DBA, but I did stay at a holiday inn express last night &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 16:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266198#M96415</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-06T16:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266199#M96416</link>
      <description>&lt;P&gt;You could also add 4 hours in splunk search prior to any statistical analysis:&lt;/P&gt;

&lt;P&gt;... | eval _time=_time+14400&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266199#M96416</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T10:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266200#M96417</link>
      <description>&lt;P&gt;I did that eval _time=_time+14400...but the problem is when you set the Timerangepicker as Today---you can't get the data between 12AM-4AM bcoz of date changes. Whatever the data I'm getting after 4AM i'm changing _time by using above search &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266200#M96417</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2020-09-29T10:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266201#M96418</link>
      <description>&lt;P&gt;In the props.conf on your indexers create a stanza like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ParMed:SalesOrder]
TZ = insert whatever is appropriate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will automagically do the math to place the events at the right chronological time.&lt;/P&gt;

&lt;P&gt;Couple links to check out&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Applytimezoneoffsetstotimestamps"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Applytimezoneoffsetstotimestamps&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 16:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266201#M96418</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2016-09-06T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266202#M96419</link>
      <description>&lt;P&gt;Runals has the better answer here.  Please see his answer and let us know if there are any issues after implementing that.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 17:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266202#M96419</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-06T17:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266203#M96420</link>
      <description>&lt;P&gt;@Runals I think this will work out--I want to change whenever the host is 10-201-&lt;EM&gt;-&lt;/EM&gt;  TZ to UTC time.&lt;/P&gt;

&lt;P&gt;[host::ip-10-201-38-20]&lt;BR /&gt;
TZ=US/UTC-----------------------is this correct?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:11:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266203#M96420</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-09-06T18:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266204#M96421</link>
      <description>&lt;P&gt;@jkat54  I think this will work out--I want to change whenever the host is 10-201-- TZ to UTC time.&lt;/P&gt;

&lt;P&gt;[host::ip-10-201-38-20]&lt;BR /&gt;
TZ=US/UTC-----------------------is this correct?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266204#M96421</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-09-06T18:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266205#M96422</link>
      <description>&lt;P&gt;I believe that will make the time zone for all logs from that host UTC which likely isn't what you want to do. Do you have instances where the logs for the same sourcetype but different hosts are configured to log in different timezones?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266205#M96422</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2016-09-06T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266206#M96423</link>
      <description>&lt;P&gt;Yes I want to change all logs from that host @Runals....NO i don;t have it &lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266206#M96423</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-09-06T18:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266207#M96424</link>
      <description>&lt;P&gt;@Runals That stanza is correct or not? because i didn't see any changes in _time&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266207#M96424</guid>
      <dc:creator>uhkc777</dc:creator>
      <dc:date>2016-09-06T18:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266208#M96425</link>
      <description>&lt;P&gt;The format of the stanza looks correct but depending on the version of Splunk you have you might have to restart the indexer(s). The data that has already been ingested is set. Setting the timezone will only impact new data.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 19:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266208#M96425</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2016-09-06T19:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp difference</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266209#M96426</link>
      <description>&lt;P&gt;the time/date settings are set upon ingestion and will only affect newer data from this host.  Also I think you want to set it to US/EDT instead as from what I can tell you want it to be eastern timezone and it's currently GMT... again from what I can tell.&lt;/P&gt;

&lt;P&gt;If you set it to US/UTC its seemingly the same timezone it's already applied.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 19:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-difference/m-p/266209#M96426</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-09-06T19:48:24Z</dc:date>
    </item>
  </channel>
</rss>

