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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...