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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...