<?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 '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30 in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331253#M61373</link>
    <description>&lt;OL&gt;
&lt;LI&gt;You can always parse the other timestamps at search time. But splunk needs to know which timestamp is THE timestamp for the event.&lt;/LI&gt;
&lt;LI&gt;If your time zone changes from event to event, you really need to include it in the log itself.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Thu, 15 Jun 2017 13:13:38 GMT</pubDate>
    <dc:creator>twinspop</dc:creator>
    <dc:date>2017-06-15T13:13:38Z</dc:date>
    <item>
      <title>How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331248#M61368</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;

&lt;P&gt;I have different date column in a csv  file and which I have uploaded manually and extracted the fields like "Assigned", "Closed", and "Created".&lt;/P&gt;

&lt;P&gt;splunk by default indexing "_time" by picking first alphabetical  date column which is Assigned and adding  +05:30 hrs, I do not know why.&lt;/P&gt;

&lt;P&gt;Whenever I query, it bring the data as per _time+5.30 (Assigned+5.30) but I am trying to display data as per "Closed" date column.&lt;/P&gt;

&lt;P&gt;How can I change the values of _time from "Assigned" to "Closed" and remove the +5.30.&lt;BR /&gt;
I want to have a time range picker that would reference a "Closed" column in the csv file as the _time.&lt;BR /&gt;
Following query I tried but failed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=service_ticket  sourcetype=ServiceTicket| chart count by Closed category
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please Help!! Thanks in advance!&lt;span class="lia-inline-image-display-wrapper" image-alt="![alt text][1]"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3024iC34233D5A48A1909/image-size/large?v=v2&amp;amp;px=999" role="button" title="![alt text][1]" alt="![alt text][1]" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 08:41:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331248#M61368</guid>
      <dc:creator>sudarshan391</dc:creator>
      <dc:date>2017-06-09T08:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331249#M61369</link>
      <description>&lt;P&gt;You need to define the time format, time zone and placement in props for this sourcetype:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ServiceTicket]
TIME_PREFIX = some-regex that defines where your time stamp starts
TIME_FORMAT = %Y-%m-%d %H:%M:%S
TZ = America/New_York
MAX_TIMESTAMP_LOOKAHEAD = 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Without a sample log, I can't help with the regex. You'll also need to change the TZ above to reflect your timezone.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331249#M61369</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2017-06-09T13:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331250#M61370</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/604"&gt;@twinspop&lt;/a&gt; thanks for your fast reply. I am new to splunk so, I am really sorry for my silly questions. &lt;/P&gt;

&lt;P&gt;From the above reply  I understand  I need to define the time format, time zone and the date/time field which i required to index as _time by writing the regex in the props......which means i need to hard code that particular time-date filed in props.&lt;/P&gt;

&lt;P&gt;I am pasting the sample log file here as a code, sorry i do not have enough karma points to attach anything. i sincerely appreciate if you can help with regex,&lt;/P&gt;

&lt;P&gt;I have a question, which TZ i should mention because the data (tickets generated) which i am having is from US and Europe and I am preparing the dashboard/reports in Asia, should i mention my timezone here?   &lt;/P&gt;

&lt;P&gt;----------Headings----------&lt;BR /&gt;
Number,Severity,Customer Identification,Open on behalf of,Affected Location,Affected Organization,&lt;STRONG&gt;Created,Assigned at,Resolved,Closed&lt;/STRONG&gt;,Short description,Category,Subcategory,Subsubcategory,Resolver group,Resolved by,Solution Category,Solution SubCategory,Resolution notes,Contact source,Reopen count,Actual elapsed time,Pause duration,Has breached&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/207572-timedate-fields.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;-------demo tickets data--------&lt;BR /&gt;
 EDC136876,4 - Low,Andrew (GG TT LS),,CSL L,GG TT LS,&lt;STRONG&gt;2017-02-16 13:13:48,2017-02-17 00:47:17,2017-02-17 13:12:05,2017-02-24 14:01:34&lt;/STRONG&gt;,Need to install Application on new laptop,Application,Software,Client Topics,EDC_Application_L1Support,Bogdan Peter (CT DD DS EU RO SERV 8),,,"Hello Colleagues,Issue has been resolved, we will close this ticket. Peter",Portal,0,894,651555,FALSE&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331250#M61370</guid>
      <dc:creator>sudarshan391</dc:creator>
      <dc:date>2020-09-29T14:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331251#M61371</link>
      <description>&lt;P&gt;The timezone you use in props.conf must reflect the timezone of the timestamp you are using as your event time (_time). It's not something that changes based on where you're viewing the log. It is part of the timestamp, even if it's not displayed as such.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ServiceTicket]
TIME_PREFIX = ,
TIME_FORMAT = %Y-%m-%d %H:%M:%S
TZ = America/New_York
MAX_TIMESTAMP_LOOKAHEAD = 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 20:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331251#M61371</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2017-06-12T20:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331252#M61372</link>
      <description>&lt;P&gt;@twinspop, thanks for your reply. i understand but still there are two confusions.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;If i written the regex for  TIME_PREFIX to defines for "Closed" then it will be like hard-coded what in case if I have to prepare the another charts from "Created"? (to list the calls created per month )&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the events which i am having are both from Europe and USA, what timezone i should put here?&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thank,&lt;BR /&gt;
Sud&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 05:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331252#M61372</guid>
      <dc:creator>sudarshan391</dc:creator>
      <dc:date>2017-06-15T05:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331253#M61373</link>
      <description>&lt;OL&gt;
&lt;LI&gt;You can always parse the other timestamps at search time. But splunk needs to know which timestamp is THE timestamp for the event.&lt;/LI&gt;
&lt;LI&gt;If your time zone changes from event to event, you really need to include it in the log itself.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 15 Jun 2017 13:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/331253#M61373</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2017-06-15T13:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change '_time'? _time is by default picking first alphabetical  date column (Assigned) and doing +05:30</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/615368#M106414</link>
      <description>&lt;P&gt;1. I also would make sure that you actually have a value for all events for that timestamp. I.e. if your csv includes open tickets do not used closed as timestamp because some event will not have value there.&lt;/P&gt;&lt;P&gt;Also, you can use earliest and latest to get a bigger window than the one you are looking for and then use explicit filtering based on the actual date field you want to filter for.&lt;/P&gt;&lt;P&gt;2. There are another two options:&lt;/P&gt;&lt;P&gt;a) Even if you are receving events from different TZ they might have agreed in using a standar TZ for all logs, such as GMT. Check that with the owner of the app.&lt;/P&gt;&lt;P&gt;b) If you can get separate csv files for each TZ you can apply different TZ when indexing them.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 11:26:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-time-time-is-by-default-picking-first-alphabetical/m-p/615368#M106414</guid>
      <dc:creator>pvarelab</dc:creator>
      <dc:date>2022-09-30T11:26:51Z</dc:date>
    </item>
  </channel>
</rss>

