Getting Data In

Need to convert the timezone dynamically

manojchacko78
Path Finder

Hello there,

I would like to convert the  default time to the local country timezone and place the converted timezone next to the default one

The defaut timezone is Central European time and based on the country name available in the report, need to conver the timezone. I guess i need to have a lookup table which the coutryname and the timezone of that country

Timestamp

CountryCode

CountryName

Region

2023-10-29T13:15:51.711ZBRBrazilAmericas
2023-10-30T10:13:19.160ZBHBahrainAPEC
2023-10-30T19:15:24.263ZAEArab EmiratesAPEC

 

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

richgalloway
SplunkTrust
SplunkTrust

Splunk doesn't really offer a means to convert time zones since each user has the ability to set their own preferred time zone.

If you really want to do it, then your lookup table will need to provide the offset from the default time zone to the local country time zone.  The you should be able to pass that value to the relative_time function.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Splunk doesn't really offer a means to convert time zones since each user has the ability to set their own preferred time zone.

If you really want to do it, then your lookup table will need to provide the offset from the default time zone to the local country time zone.  The you should be able to pass that value to the relative_time function.

---
If this reply helps you, Karma would be appreciated.

manojchacko78
Path Finder

Worked, thanks

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...