Java application timezone cannot be set with podman --tz option
Issue
A container is started with the podman run
command:
podman run -ti --rm --tz=Europe/Berlin zonedhello
It sets up the TZ(Europe/Berlin) as /usr/share/zoneinfo/UTC
.
Since /etc/localtime
is a symlink of /usr/share/zoneinfo/UTC
, this works with command line utilities like date
.
However, a Java application does not read /etc/localtime
but checks the Zonefile and considers the TZ as UTC.
Environment
- Openshift Container Platform (OCP)
- podman
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.