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!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...