<?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: Fix timezone Issue - logs showing up in UTC time but generated in a different time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629590#M107969</link>
    <description>&lt;P&gt;What you've tried should work if you use the right time zone value.&amp;nbsp; Try either the canonical name&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TZ = America/Los_Angeles&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or the abbreviation&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TZ = PST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2023 01:29:21 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-02-04T01:29:21Z</dc:date>
    <item>
      <title>Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629585#M107968</link>
      <description>&lt;P&gt;Background:&lt;BR /&gt;I am sending data to Splunk Cloud through an Intermediate Forwarder, which is a universal forwarder from multiple source instances (both in Pacific time and UTC) that do not support HEC and the correct TLS versions. As of now, this is the only way of sending the logs.&amp;nbsp;&lt;BR /&gt;Sources (PT and UTC) &amp;gt; Intermediate Forwarder &amp;gt; Splunk Cloud&lt;/P&gt;&lt;P&gt;Problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the source instances are in Pacific time zone and the intermediate forwarder is in UTC. The logs that are coming from the instances that are in PT, are showing up in UTC time in Splunk Cloud. So Splunk Cloud is showing that the logs are from a time earlier than the they really got generated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I should also say that the logs have a timestamp (PT - correct time) in them, always within the first 70 characters or so at most. That is the time I want them to be shown in.&amp;nbsp;&lt;BR /&gt;Also changing the intermediate forwarder timezone to PT fixes the issue for the instances in PT but messes up the instances that are in UTC.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;As a solution, I saw that timezones can be configured in the props.conf file, located in (after creation) /opt/splunkforwarder/etc/system/local directory.&amp;nbsp;&lt;BR /&gt;Here is what it looks like for me:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[host::&amp;lt;some of the hosts&amp;gt;]

TZ = US/Pacific&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried adding the following argument in the stanza (according to this post&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Universal-Forwarder-and-props-conf-and-transforms-conf/m-p/39732/highlight/true#M7401" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Getting-Data-In/Universal-Forwarder-and-props-conf-and-transforms-conf/m-p/39732/highlight/true#M7401&lt;/A&gt;) but it is of no help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;force_local_processing = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;However, this just does not work. I can see logs in Splunk Cloud but they are in UTC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried using&amp;nbsp;&lt;SPAN&gt;&amp;lt;sourcetype&amp;gt; and&amp;nbsp;source::&amp;lt;source&amp;gt; instead of [host::&amp;lt;myhost&amp;gt;] but it doesn't do anything.&amp;nbsp;&lt;BR /&gt;Any other things that I can try?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 23:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629585#M107968</guid>
      <dc:creator>jmr44</dc:creator>
      <dc:date>2023-02-03T23:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629590#M107969</link>
      <description>&lt;P&gt;What you've tried should work if you use the right time zone value.&amp;nbsp; Try either the canonical name&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TZ = America/Los_Angeles&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or the abbreviation&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TZ = PST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 01:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629590#M107969</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-04T01:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629594#M107970</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;, thank you so much for your reply!&lt;BR /&gt;TZ = America/Los_Angeles has helped me a bit.&amp;nbsp;&lt;BR /&gt;However, I am not joking but the logs of&amp;nbsp; only one sourcetype of &amp;lt;myhost&amp;gt; show up. The other 3 don't.&amp;nbsp;&lt;BR /&gt;This is what I have now:&lt;/P&gt;&lt;P&gt;[host::&amp;lt;my host&amp;gt;]&lt;BR /&gt;TZ = America/Los_Angeles&lt;BR /&gt;force_local_processing = true&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 02:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629594#M107970</guid>
      <dc:creator>jmr44</dc:creator>
      <dc:date>2023-02-04T02:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629606#M107972</link>
      <description>&lt;P&gt;Don't use &lt;FONT face="courier new,courier"&gt;force_local_processing&lt;/FONT&gt;.&amp;nbsp; It doesn't solve your problem.&lt;/P&gt;&lt;P&gt;When you say 3 sourcetypes don't show up do you mean they don't have the correct time zone or they aren't present at all?&amp;nbsp; If the latter then you have a different problem that should be in a new question.&lt;/P&gt;&lt;P&gt;If the former then try putting the &lt;FONT face="courier new,courier"&gt;TZ&lt;/FONT&gt; setting in &lt;FONT face="courier new,courier"&gt;sourcetype:&lt;/FONT&gt; stanzas rather than &lt;FONT face="courier new,courier"&gt;host:&lt;/FONT&gt; stanzas.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 13:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629606#M107972</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-04T13:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629626#M107974</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;, all of them show up but Splunk shows a different time, than the time posted in the logs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The timestamp is in the logs within the first 50-60 characters but Splunk shows them at a different time.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;On a sidenote, can I filter out the logs by combining both host and sourcetype? For example:&amp;nbsp;&lt;BR /&gt;[host::&amp;lt;myhost&amp;gt; and &amp;lt;sourcetype&amp;gt;]?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am just doing [host::&amp;lt;myhost&amp;gt;]&lt;BR /&gt;&lt;BR /&gt;For example, in the log:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt; &lt;SPAN class=""&gt;2023-02-04&lt;/SPAN&gt; &lt;SPAN class=""&gt;20:47:59 XXXYYYZZZ AAA BBB CCC - that is when it is generated and sent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;but splunk shows:&amp;nbsp;&lt;SPAN&gt;2023-02-04T13:47.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 04:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629626#M107974</guid>
      <dc:creator>jmr44</dc:creator>
      <dc:date>2023-02-05T04:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629649#M107975</link>
      <description>&lt;P&gt;No, you cannot combine host and sourcetype in a stanza name.&lt;/P&gt;&lt;P&gt;Do all 3 of the incorrect sourcetypes have the same format?&amp;nbsp; If so, then they should be a single sourcetype.&amp;nbsp; Otherwise, please share the others so we can better figure out why times are not interpreted correctly.&lt;/P&gt;&lt;P&gt;Confirm you restarted the UF after changing props.conf.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 15:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629649#M107975</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-05T15:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629658#M107976</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;I have restarted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;They do not. There's also cases where one sourcetype from one host shows up/parses the correct time format but when they are coming from a different source, it doesn't.&amp;nbsp; I'll explain below:&lt;/P&gt;&lt;P&gt;Five different hosts - host_A (MST), host_B (MST), host_C (UTC), host_D (UTC), host_E (UTC)&lt;/P&gt;&lt;P&gt;Four different source types - src_W, src_X, src_Y, src_Z&lt;/P&gt;&lt;P&gt;For host_A (MST) and host_B (MST), src_W is shown at the correct time. src_X and src_Y are not. For example - if src_X and src_Y have the timestamp of 05/02/2022 14:xx:xx. in splunk, it shows as 04/02/2022 7:xx:xx.&amp;nbsp;&lt;BR /&gt;Between these two, src_Z only comes from host_A and&amp;nbsp;the timestamp of 05/02/2022 14:xx:xx. in splunk, it shows as 04/02/2022 9:xx:xx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For host_C (UTC) -&amp;nbsp;if src_W and src_X have the timestamp of 05/02/2022 21:xx:xx. in splunk, it shows as 04/02/2022 2:xx:xx. host_C doesn't have Y and Z.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For host_D (UTC) -&amp;nbsp;if src_Y has the timestamp of 05/02/2022 21:xx:xx. in splunk, it shows as 04/02/2022 2:xx:xx. host_D doesn't have the other sourcetypes.&lt;/P&gt;&lt;P&gt;For host_E (UTC) -&amp;nbsp;if src_Y has the timestamp of 05/02/2022 21:xx:xx. in splunk, it shows as 04/02/2022 2:xx:xx. host_E doesn't have the other sourcetypes. For src_Z timestamp of 05/02/2022 14:xx:xx. in splunk, it shows as 04/02/2022 9:xx:xx - just like in host_A.&lt;/P&gt;&lt;P&gt;Sorry this might seem to be very complicated and it is in MST and not PST like I said before. My Splunk Cloud instance is also set to MST.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is how the log formatting looks like:&lt;/P&gt;&lt;P&gt;This is how log from src_W is:&amp;nbsp;&lt;BR /&gt;&lt;SPAN class=""&gt;eni=xx.yy.zz.aa&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;client_ip=-&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN class=""&gt;05/Feb/2023:17:46:53&lt;/SPAN&gt; &lt;SPAN class=""&gt;-0700&lt;/SPAN&gt;&lt;SPAN&gt;] ... ... ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is how log from&amp;nbsp; src_X is:&lt;BR /&gt;&lt;SPAN class=""&gt;DEBUG&lt;/SPAN&gt; &lt;SPAN class=""&gt;2023-02-06&lt;/SPAN&gt; &lt;SPAN class=""&gt;00:49:22 ... ... ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;This is how log from src_Y is:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;INFO 2023-02-06 00:50:02 ... ... ...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;This is how log from src_Z is:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;qwertyui Sun Feb 5 04:40:39 2023:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for the help!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 00:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629658#M107976</guid>
      <dc:creator>jmr44</dc:creator>
      <dc:date>2023-02-06T00:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timezone Issue - logs showing up in UTC time but generated in a different time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629798#M107987</link>
      <description>&lt;P&gt;Thanks for the details.&lt;/P&gt;&lt;P&gt;I'll start with the easy one.&amp;nbsp; I see that src_W contains time zone information in the timestamp.&amp;nbsp; This means Splunk should have no difficulty setting the right time, provided the &lt;FONT face="courier new,courier"&gt;TIME_FORMAT&lt;/FONT&gt; setting is correct (&lt;FONT face="courier new,courier"&gt;%d/%B&lt;SPAN class=""&gt;/%Y:%H:%M:%S%z&lt;/SPAN&gt;&lt;/FONT&gt;) for the sourcetype.&lt;/P&gt;&lt;P&gt;src_X and src_Y have the same time format, but that's different from src_W.&amp;nbsp; src_Z has yet another time format.&amp;nbsp; Verify each source references a sourcetype that has the appropriate &lt;FONT face="courier new,courier"&gt;TIME_FORMAT&lt;/FONT&gt; setting.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I haven't said it before, I'll say it now.&amp;nbsp; Make sure you're looking at a real problem.&amp;nbsp; Splunk will display times in your selected time zone so something you may expect to see in UTC will appear in MST.&amp;nbsp; If you change your selected time zone to UTC and times still are off by hours then you have a real problem.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 21:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fix-timezone-Issue-logs-showing-up-in-UTC-time-but-generated-in/m-p/629798#M107987</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-06T21:47:49Z</dc:date>
    </item>
  </channel>
</rss>

