Splunk Search

How to convert the GMT timezone to EST timezone at search time?

abhi04
Communicator

Hi,

I have a field named "statusChanged" as shown below. I need to convert this (GMT) to EST . please help on the same.

statusChanged: 2018-10-17T15:29:32.000Z

0 Karma

abhi04
Communicator

eval EST_Time=strftime(strptime(statusChanged,"%Y-%m-%dT%H:%M:%S.%3N%Z"),"%Y-%m-%d %H:%M:%S")

0 Karma

somesoni2
Revered Legend

There are no direct function available to do so , but you can try workarounds provided in this post: https://answers.splunk.com/answers/241917/timezone-conversion-function.html

abhi04
Communicator

@somesoni2 The below worked .

eval EST_Time=strftime(strptime(statusChanged,"%Y-%m-%dT%H:%M:%S.%3N%Z"),"%Y-%m-%d %H:%M:%S")

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...