Java application timezone cannot be set with podman --tz option

Solution Unverified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content