Dashboards & Visualizations

How to display last update time for a specific timezone irrespective of the local timezone?

Taruchit
Contributor

Hi All,

I referred the following https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-page-last-updated-time-... to display the last refreshed/updated date-time on the dashboard.

In my case, it uses my local system's timezone to display the result. I changed the timezone in Splunk from default to EST, but it still takes and displays time as per local timezone. Can anybody please share a way to display the date time for a specific timezone irrespective of the local timezone on which the dashboard is being accessed? 

Thank you

Labels (2)
Tags (1)
0 Karma
1 Solution

PickleRick
SplunkTrust
SplunkTrust

Short answer is - you can't.

Long answer is - splunk strftime always shows time in the timezone of your user. And there's a pretty solid rationale for that - you don't want your users get confused because someone hardcoded some static timezone information in the report/dashboard/whatever. You can "cheat" a bit by calculating an offset between different timezones and then render the timestamp in the user's timezone , then cut the timezone information and glue some static timezone string - a very, very ugly solution and I would advise wholeheartedly against it.

View solution in original post

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Short answer is - you can't.

Long answer is - splunk strftime always shows time in the timezone of your user. And there's a pretty solid rationale for that - you don't want your users get confused because someone hardcoded some static timezone information in the report/dashboard/whatever. You can "cheat" a bit by calculating an offset between different timezones and then render the timestamp in the user's timezone , then cut the timezone information and glue some static timezone string - a very, very ugly solution and I would advise wholeheartedly against it.

0 Karma

Taruchit
Contributor

Thank you for sharing your inputs.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...