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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...