Splunk Search

How do I adjust a time calculation for results being generated in multiple timezones

bigtyma
Communicator

I need to calculate the duration of time between events however my source does not adjust for timezones.

In my example a calculating the duration of when a helpdesk log was created and acknowledged is generating negative numbers for persons that live outside the timezone where the database entry was added.

Is there a way to dynamically add +1 hour to results that generate a negative number?

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Assuming the result is in seconds,

eval result = if(result<0, result+3600, result)
0 Karma

bigtyma
Communicator

Thank you!

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