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
SplunkTrust
SplunkTrust

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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...