Getting Data In

How to get non-abbreviated time-zone?

georgiawebber
Engager

Is there a way to display the full timezone and not just the abbreviation? The SPL I am currently using is:

| eval zone=strftime(time(),"%Z %z") 

However this just gives me the abbreviation (i.e. "AEST +1000"). I would like it to display "Australian Eastern Standard Time +1000".

0 Karma
1 Solution

Noah_Woodcock
Path Finder

Anam
Community Manager
Community Manager

Hi @georgiawebber

I am the Community Content Specialist for Splunk Answers. If any of the answers worked for you please go ahead and accept it, if not let the community know if you need more clarification.

Thanks

0 Karma

georgiawebber
Engager

Oops! Sorry I forgot I had this question out there. Have now accepted!

0 Karma

efavreau
Motivator

If it's consistently like in your question, here's a run anywhere example that everytime the zone field start with "AEST", it will replace it with "Australian Eastern Standard Time".

| makeresults
| eval zone=strftime(time(),"%Z %z")
| rex mode=sed field=zone "s/^(AEST)/Australian Eastern Standard Time/"

The makeresults command is simply to get it to work as an example, but what you need after your eval statement, is the third line.

###

If this reply helps you, an upvote would be appreciated.
0 Karma

efavreau
Motivator

@georgiawebber Did this solution work for you? Did you need to clarify your question? Please remember to accept the answer that helped, or clarify your question/comment on the answers that are close.

###

If this reply helps you, an upvote would be appreciated.
0 Karma

Noah_Woodcock
Path Finder

You can also scrape things like wikipedia and make your own lookups with apps like these:
https://splunkbase.splunk.com/app/4146/
https://splunkbase.splunk.com/app/3226/
https://splunkbase.splunk.com/app/635/

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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