Getting Data In

How to convert "LastBootUpTime" to epoch time (including the timezone offset) in order to get the epoch reported in GMT?

ppeterson
Path Finder

I'm having difficulties converting Microsoft's LastBootUpTime into Epoch taking the timezone offset into account to get an Epoch in GMT value for comparison. Would anyone have any ideas to assist?

LastBootUpTime="20170522110049.412726-240"

Thanks,
Paul

0 Karma

somesoni2
Revered Legend

Give this a try (runanywhere search for testing, just use the last line for conversion expression)

| gentimes start=-1 | eval LastBootUpTime="20170522110049.412726-240" 
| eval _time=strptime(LastBootUpTime,"%Y%m%d%H%M%S.%N%Z")
0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...