Getting Data In

How do you display multiple timezones corrected for daylight savings from a correct epoch time?

landen99
Motivator

How do you display multiple timezones corrected for daylight savings from a correct epoch time?

Tags (2)
0 Karma

landen99
Motivator

Create a macro to calculate the new time using UTC offsets. Create another macro to calculate the correct UTC offset based on the time of year for Daylight Savings:

 eval date_year=strftime(_time,"%Y"),date_mon=strftime(_time,"%m"),date_day=strftime(_time,"%e"),date_hour=strftime(_time,"%H"),date_min=strftime(_time,"%M"),date_sec=strftime(_time,"%S"),date_tz=strftime(_time,"%:::z"),date_tz_offset="+11",date_doy=strftime(_time,"%j"),date_hour_new=(date_hour-date_tz+date_tz_offset)%24,date_day_new=date_day+floor((date_hour-date_tz+date_tz_offset)/24),date_new=date_year."-".date_mon."-".date_day_new." ".date_hour_new.":".date_min.":".date_min." UTC".date_tz_offset,date=date_year."-".date_mon."-".date_day." ".date_hour.":".date_min.":".date_min." UTC".date_tz
0 Karma
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...