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 --- pkg/specgen/generate/container_create.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/specgen/generate') diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 7b4fbebf4..160a0fa55 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": -- cgit v1.2.3-54-g00ecf