Dashboards & Visualizations

how to display _time in user local time

svec7186
Loves-to-Learn Lots

i publish metric time in GMT.  the data displays in GMT.  is there a way to convert the GMT to the users local time when looking at results in the dashboard?

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

The _time variable will be displayed in the user's local time, and user's local time is controlled by the Preferences settings in the user dropdown menu in Splunk.

If your data is ingested with times being interpreted as GMT and the server time zone is GMT, then when the user views _time, it will be rendered based on the user's settings.

If you are talking about another field, e.g. a string that is showing GMT, then you can do this to get _time

| makeresults
| fields - _time
| eval T="2021-01-26 11:00:00"
| eval _time=strptime(T." GMT", "%F %T %Z")

which will show T as the time above and _time as 2021-01-26 22:00:00, as I am currently GMT+11

 

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, ...