Getting Data In

Determine if string time is in daylight savings time or not?

nick405060
Motivator

Hi,

I need to be able to determine if string time X is PST or PDT. My Splunk timezone is set to Pacific. How?

0 Karma
1 Solution

nick405060
Motivator
| makeresults | eval x="2019-03-10 10:30:00" | eval pst_epoch=strptime(x,"%Y-%m-%d %H:%M:%S") | eval pxt=strftime(pst_epoch,"%Z") | table pxt

Switch 3/10/19 to be 3/1/19 and you'll see the switch.

View solution in original post

0 Karma

nick405060
Motivator
| makeresults | eval x="2019-03-10 10:30:00" | eval pst_epoch=strptime(x,"%Y-%m-%d %H:%M:%S") | eval pxt=strftime(pst_epoch,"%Z") | table pxt

Switch 3/10/19 to be 3/1/19 and you'll see the switch.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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