#Random
This is a place to discuss all things outside of Splunk, its products, and its use cases.

Feature Request: Docker TimeZone

bstreber
Path Finder

Currently Splunk's Docker container does not support TZ or TIMEZONE options. I am able to change the TZ for a individual user but this still causes discrepancies in some log files and times. Additionally for free users who are unable to set a TZ for users this means they are stuck on UTC.

codebuilder
Influencer

You'll have to rebuild the Docker image using updated TZ in the Docker Makefile.

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

cloutid
New Member

Hi, have you tried modifying the Dockerfile and set the timezone there?

0 Karma

bstreber
Path Finder

Yeah I attempted TIMEZONE = America/Vancouver and when I enter "date" in the console it would respond with the UTC time but specify the timezone I selected.

0 Karma

cloutid
New Member

Here's how i did it in my dockerfile and it seems to be working:

ARG SPLUNK_VERSION

FROM splunk/splunk:${SPLUNK_VERSION}

ENV TZ=America/Toronto

USER root

RUN set -eux chown -R splunk:splunk /opt/splunk/etc/; \
chmod -R 755 /opt/splunk/etc/; \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone;

USER ansible

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...