<?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 generate a proper timestamp on events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251869#M48473</link>
    <description>&lt;P&gt;Just return _time as epoch.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2016 19:21:31 GMT</pubDate>
    <dc:creator>dominiquevocat</dc:creator>
    <dc:date>2016-12-04T19:21:31Z</dc:date>
    <item>
      <title>How to generate a proper timestamp on events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251866#M48470</link>
      <description>&lt;P&gt;I have data where i get a date/timestamp as a string and an offset as a string from some API.&lt;/P&gt;

&lt;P&gt;I manage to generate the &lt;STRONG&gt;_time&lt;/STRONG&gt; field and it shows properly in the event view and stuff like time based drilldown (plus minus n seconds) works.&lt;/P&gt;

&lt;P&gt;However only the field &lt;STRONG&gt;_time&lt;/STRONG&gt; is available on the event and the &lt;STRONG&gt;date_hour&lt;/STRONG&gt; etc fields do not show up, thus timechart etc won't work.&lt;/P&gt;

&lt;P&gt;I tried to generate the timestamp subfields and append them to the event but they are not visible in Splunk.&lt;/P&gt;

&lt;P&gt;What do i need to take care of to get proper events with a proper timestamp?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:09:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251866#M48470</guid>
      <dc:creator>dominiquevocat</dc:creator>
      <dc:date>2016-11-30T17:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a proper timestamp on events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251867#M48471</link>
      <description>&lt;P&gt;One of the crude options in our case would be to overwrite _time with field_time. Provided field_time is time stored in string format. PS: The time format below is assuming string date time string is in YYYY/MM/DD HH:MM:SS format. You can use your own time formatting based on your exiisting field_time values.&lt;BR /&gt;
&lt;STRONG&gt;| eval _time= strptime(field_time,"%Y/%m/%d %H:%M:S") | timechart&lt;/STRONG&gt; ...&lt;/P&gt;

&lt;P&gt;If field_time contains epoch time and not string time then direct assignment should work: &lt;BR /&gt;
** | eval _time=field_time |  timechart **...&lt;/P&gt;

&lt;P&gt;Since identification of exact time for various event is most crucial for Splunk, ideally, _time should be parsed and identified directly during data ingestion for optimal performance and accurate results. Any modifications to _time field afterwards may lead to unwanted results and issues.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251867#M48471</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T11:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a proper timestamp on events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251868#M48472</link>
      <description>&lt;P&gt;doh'&lt;/P&gt;

&lt;P&gt;if i just send it as epoch its fine. Erm.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 16:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251868#M48472</guid>
      <dc:creator>dominiquevocat</dc:creator>
      <dc:date>2016-12-02T16:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a proper timestamp on events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251869#M48473</link>
      <description>&lt;P&gt;Just return _time as epoch.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2016 19:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-generate-a-proper-timestamp-on-events/m-p/251869#M48473</guid>
      <dc:creator>dominiquevocat</dc:creator>
      <dc:date>2016-12-04T19:21:31Z</dc:date>
    </item>
  </channel>
</rss>

