Getting Data In

What function or command can I use for Splunk to map the latitude and longitude into corresponding timezones?

xiangtaner
Path Finder

Hi,

Currently in my data, I have latitude and longitude info for all locations around the world. Is there a way or a handy function available in Splunk to map the latitude and longitude into the corresponding timezone?

For example, as to a specific location in city of San Francisco, the time zone should be mapped to "Pacific Time Zone". Moreover, once we have the time zone mapped, could we go one step forward to get the time offset/delta to UTC? With the same example, for locations in San Francisco, the time offset to UTC is "-08:00".

Thank you!

0 Karma
1 Solution

xiangtaner
Path Finder

Thanks for all the help and responses! Thought Splunk has a built-in function. But I finally did it outside of Splunk using R and google timezone API call. http://stackoverflow.com/questions/23414340/convert-to-local-time-zone-using-latitude-and-longitude

Best,

View solution in original post

xiangtaner
Path Finder

Thanks for all the help and responses! Thought Splunk has a built-in function. But I finally did it outside of Splunk using R and google timezone API call. http://stackoverflow.com/questions/23414340/convert-to-local-time-zone-using-latitude-and-longitude

Best,

aaraneta_splunk
Splunk Employee
Splunk Employee

Hi @xiangtaner - If you came up with the answer to your question, be sure to resolve your post by clicking "Accept" directly below your answer. Thank you!

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

The Splunk function you're looking for is a geospatial lookup: http://docs.splunk.com/Documentation/Splunk/6.4.3/Knowledge/Configuregeospatiallookups

For that to work you'll need a KMZ file with the timezone shapes... with a quick googling I only found a shapefile at http://efele.net/maps/tz/world/ - that can easily be converted to KMZ: http://blogs.splunk.com/2015/10/01/use-custom-polygons-in-your-choropleth-maps/ (option 2)

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi xiangtaner,

you can download a free timezone database as csv file here https://timezonedb.com/download and use it as lookup in Splunk.

Hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...