Splunk Dev

How to Retrieve Timezones List in Splunk React App

sanjai
Communicator

Hi Splunkers,

I am currently working on a development activity with the Splunk React app and need to get the list of timezones from Splunk into my app.

sanjai_0-1740728150115.png

From my research, I found that the list of timezones is located in a file called TimeZones.js at the following path:
C:\Program Files\Splunk\quarantined_files\share\splunk\search_mrsparkle\exposed\js\collections\shared\TimeZones.js

Questions:

  1. How can I retrieve the full list of timezones from the TimeZones.js file?
  2. Is there a way to get the timezones via a REST API?
  3. Any other suggestions or thoughts on how to achieve this would be appreciated.

Thanks in advance!
Sanjai

Labels (4)
0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @sanjai 

I believe you are on to the right thing here with `collections/shared/TimeZones`

If you have a look at /opt/splunk/share/splunk/search_mrsparkle/exposed/js/views/shared/preferences/global/GlobalSettingsContainer.jsx it references the same file, and this is the file which renders the user preferences and displays the Time zone dropdown.

Have a look at including that file (collections/shared/TimeZones.js) , or maybe copying it in to your app for the purposes of testing.

My paths are Linux based by the way, so might need updating for your environment.

Good luck!

Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.
Regards

Will

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...