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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...