summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-06 13:28:20 -0400
committerGitHub <noreply@github.com>2020-07-06 13:28:20 -0400
commit9532509c50113ac9470108e3492e2769bac533e8 (patch)
tree4d691205d2c574b6c7ab6eb3c62937b327898f58 /cmd/podman/common
parent9eac75a967e3459b32b1acd220afb49b60f5e5aa (diff)
parent9a1543caec75a7b02dd2ec9a1111756bb1716454 (diff)
downloadpodman-9532509c50113ac9470108e3492e2769bac533e8.tar.gz
podman-9532509c50113ac9470108e3492e2769bac533e8.tar.bz2
podman-9532509c50113ac9470108e3492e2769bac533e8.zip
Merge pull request #6836 from ashley-cui/tzlibpod
Add --tz flag to create, run
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go5
-rw-r--r--cmd/podman/common/create_opts.go1
-rw-r--r--cmd/podman/common/specgen.go1
3 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index c522bbffb..bbe31d19f 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -449,6 +449,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"tty", "t", false,
"Allocate a pseudo-TTY for container",
)
+ createFlags.StringVar(
+ &cf.Timezone,
+ "tz", containerConfig.TZ(),
+ "Set timezone in container",
+ )
createFlags.StringSliceVar(
&cf.UIDMap,
"uidmap", []string{},
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 8bce48d8d..3183a5cce 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -91,6 +91,7 @@ type ContainerCLIOpts struct {
Systemd string
TmpFS []string
TTY bool
+ Timezone string
UIDMap []string
Ulimit []string
User string
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index c9232654a..225370368 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -619,6 +619,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
}
s.Remove = c.Rm
s.StopTimeout = &c.StopTimeout
+ s.Timezone = c.Timezone
return nil
}