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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...