From 9a1543caec75a7b02dd2ec9a1111756bb1716454 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Tue, 30 Jun 2020 17:21:52 -0400 Subject: Add --tz flag to create, run --tz flag sets timezone inside container Can be set to IANA timezone as well as `local` to match host machine Signed-off-by: Ashley Cui --- docs/source/markdown/podman-create.1.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/source/markdown/podman-create.1.md') diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index 30ac54de2..1fc99cd87 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -815,6 +815,10 @@ interactive shell. The default is false. Note: The **-t** option is incompatible with a redirection of the Podman client standard input. +**--tz**=*timezone* + +Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones. + **--uidmap**=*container_uid:host_uid:amount* UID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `--userns` and `--subuidname` flags. @@ -1036,6 +1040,14 @@ the uids and gids from the host. $ podman create --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello ``` +### Configure timezone in a container + +``` +$ podman create --tz=local alpine date +$ podman create --tz=Asia/Shanghai alpine date +$ podman create --tz=US/Eastern alpine date +``` + ### Rootless Containers Podman runs as a non root user on most systems. This feature requires that a new enough version of shadow-utils -- cgit v1.2.3-54-g00ecf