summaryrefslogtreecommitdiff
path: root/pkg
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 /pkg
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 'pkg')
-rw-r--r--pkg/specgen/generate/container_create.go4
-rw-r--r--pkg/specgen/specgen.go3
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 2b84aa8c5..1ab576869 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -135,6 +135,10 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen.
options = append(options, libpod.WithStdin())
}
+ if s.Timezone != "" {
+ options = append(options, libpod.WithTimezone(s.Timezone))
+ }
+
useSystemd := false
switch s.Systemd {
case "always":
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 361f09379..fe735bc1f 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -135,6 +135,9 @@ type ContainerBasicConfig struct {
// passed will be 3 + PreserveFDs.
// set tags as `json:"-"` for not supported remote
PreserveFDs uint `json:"-"`
+ // Timezone is the timezone inside the container.
+ // Local means it has the same timezone as the host machine
+ Timezone string `json:"timezone,omitempty"`
}
// ContainerStorageConfig contains information on the storage configuration of a