<?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: drilldown of timechart changing to epoch time in user's time zone in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688105#M234640</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242594"&gt;@loganramirez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;usually Splunk displays date in the timezone defined for the user.&lt;/P&gt;&lt;P&gt;to pass a timestamp in a different timezone, use eval and pass the transformed value instead of the original one.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 05:47:47 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-05-21T05:47:47Z</dc:date>
    <item>
      <title>drilldown of timechart changing to epoch time in user's time zone</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688075#M234631</link>
      <description>&lt;P&gt;I have a dbxquery command that queries an Oracle server that has a DATE format value stored in GMT.&lt;/P&gt;&lt;P&gt;My SQL converts it to SQL so I can later use strptime into the _time value for timecharting:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT TO_CHAR(INTERVAL_START_TIME, 'YYYY-MM-DD-hh24-mi-ss') as Time
FROM ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then at the end of my SPL:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| eval _time=strptime(TIME,"%Y-%m-%d-%H-%M-%S")
| timechart span=1h sum(VALUE) by CATEGORY&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;On the chart that renders, we see values in GMT (which we want).&lt;/P&gt;&lt;P&gt;My USER TIMEZONE is Central Standard, however, and not GMT.&lt;/P&gt;&lt;P&gt;When I click (drilldown) a value $click.value$, it passes the epoch time CONVERTED TO CST.&lt;/P&gt;&lt;P&gt;As an example, if I click the bar chart that is for 2PM today, my click-action parm is&amp;nbsp;1715972400.000 which is&amp;nbsp;Friday, May 17, 2024 7:00:00 PM GMT - 5 hours ahead.&lt;BR /&gt;&lt;BR /&gt;I validated this by changing my user tz to GMT and it passes in the epoch time in GMT.&lt;BR /&gt;&lt;BR /&gt;I googled 'splunk timezone' and haven't found anything, yet, that addresses this specifically (did find this thread that is related, but no solution &lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/Drill-down-changes-timezones/m-p/95599" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/Drill-down-changes-timezones/m-p/95599&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;So wanted to ask here!&lt;BR /&gt;&lt;BR /&gt;It's an issue because the drilldown also relies on dbxquery data, and so my current attack plan is to deal with the incorrect time on the drilldown (in SQL), but I can only support that if all users are in the same timezone.&lt;BR /&gt;&lt;BR /&gt;In conclusion, what would be nice is if I could tell Splunk to 'not change the epoch time' when clicked.&lt;BR /&gt;&lt;BR /&gt;I think!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 19:31:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688075#M234631</guid>
      <dc:creator>loganramirez</dc:creator>
      <dc:date>2024-05-20T19:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: drilldown of timechart changing to epoch time in user's time zone</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688105#M234640</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242594"&gt;@loganramirez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;usually Splunk displays date in the timezone defined for the user.&lt;/P&gt;&lt;P&gt;to pass a timestamp in a different timezone, use eval and pass the transformed value instead of the original one.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 05:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688105#M234640</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-05-21T05:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: drilldown of timechart changing to epoch time in user's time zone</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688175#M234653</link>
      <description>&lt;P&gt;so use eval and transform the epoch value to the desired tz?&lt;BR /&gt;&lt;BR /&gt;i haven't found a built in Splunk function for that, just threads like &lt;A href="https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-in-Splunk-to-change-the-timezone-or-a-raw-event/m-p/576076" target="_self"&gt;this&lt;/A&gt; that use the offset, but since that changes from 5 to 6 hours with daylight savings, do you know of one that supports 'cst6cdt'?&lt;/P&gt;&lt;P&gt;and thank you!&amp;nbsp; overall that approach makes sense to me.&amp;nbsp; pass something (make something to pass) other than the click.value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688175#M234653</guid>
      <dc:creator>loganramirez</dc:creator>
      <dc:date>2024-05-21T14:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: drilldown of timechart changing to epoch time in user's time zone</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688187#M234654</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242594"&gt;@loganramirez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you can use the solution in the shared link or the fuction relative_time in eval.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 15:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688187#M234654</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-05-21T15:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: drilldown of timechart changing to epoch time in user's time zone</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688188#M234655</link>
      <description>&lt;P&gt;The problem with both of those is it does not account for the 5 vs 6 hour shift between CDT and CST.&lt;/P&gt;&lt;P&gt;That is, solutions like &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-in-raw-data-to-different-timezone/m-p/601361" target="_self"&gt;this&lt;/A&gt; that use relative_time, manually subtract 5 or 6 hours, but do not differentiate when to make that shift (March-ish to November-ish), but Splunk has TZ awareness since the user can set their profile.&lt;BR /&gt;&lt;BR /&gt;Seems like there should be a way (a function?) to tap into that, but something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;relative_time(epoch, "CST6CDT") &lt;/LI-CODE&gt;&lt;P&gt;doesn't seem exist.&lt;BR /&gt;&lt;BR /&gt;Many thanks for the great conversation as, per usual, learning!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 15:17:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drilldown-of-timechart-changing-to-epoch-time-in-user-s-time/m-p/688188#M234655</guid>
      <dc:creator>loganramirez</dc:creator>
      <dc:date>2024-05-21T15:17:43Z</dc:date>
    </item>
  </channel>
</rss>

