All Apps and Add-ons

Horizon Chart - How can I change the axis based on user's timezone?

alvin_kwong
Engager

Recently I observed that the axis in Horizon Chart is not following the timezone setting by the user. Please refer to the images below,

  • The user with timezone setting as GMT+0800
    alt text

  • The user with timezone setting as GMT
    alt text

Do I have any method that I can apply the timezone configured by the user in Splunk on the axis?

1 Solution

to4kawa
Ultra Champion
| makeresults count=2
| streamstats count
| eval _time = if (count==2,relative_time(_time,"-24h@m"), relative_time(_time,"@m"))
| makecontinuous span=30m
| eval col1=random() % 20, col2=random() % 20, col3=random() % 20
| fieldformat _time = strftime(_time,"%c %:::z")
| table _time col*
| eval COMMENT AS "this is sample data"

It runs in local time

In the worst case, add the following command:
| eval _time = relative_time (_time, "The timezone offset from UTC")

View solution in original post

0 Karma

to4kawa
Ultra Champion
| makeresults count=2
| streamstats count
| eval _time = if (count==2,relative_time(_time,"-24h@m"), relative_time(_time,"@m"))
| makecontinuous span=30m
| eval col1=random() % 20, col2=random() % 20, col3=random() % 20
| fieldformat _time = strftime(_time,"%c %:::z")
| table _time col*
| eval COMMENT AS "this is sample data"

It runs in local time

In the worst case, add the following command:
| eval _time = relative_time (_time, "The timezone offset from UTC")

0 Karma

ahartge
Path Finder

I know its over a year later - but did you resolve this ? I would like to know why Horizon Chart doesnt use the localised _time generated by | timestamp but instead uses the UTC timestamp from the event

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...