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!

Customer Experience | Splunk 2024: New Onboarding Resources

In 2023, we were routinely reminded that the digital world is ever-evolving and susceptible to new ...

Celebrate CX Day with Splunk: Take our interactive quiz, join our LinkedIn Live ...

Today and every day, Splunk celebrates the importance of customer experience throughout our product, ...

How to Get Started with Splunk Data Management Pipeline Builders (Edge Processor & ...

If you want to gain full control over your growing data volumes, check out Splunk’s Data Management pipeline ...