diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-16 22:37:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 22:37:49 +0100 |
commit | 52d5f367b144f755dd20b18d88c5f79bc6b0c3fe (patch) | |
tree | e0e87c0e5e7861960107a697bcf01c2d6ebfe72c /cmd/podman/machine/init.go | |
parent | 2c98694559b6413ec4f9abdb6d3750b6dd46cc4f (diff) | |
parent | a86495ea6fdd56519afc65586c0f7f9c0f4f5ab2 (diff) | |
download | podman-52d5f367b144f755dd20b18d88c5f79bc6b0c3fe.tar.gz podman-52d5f367b144f755dd20b18d88c5f79bc6b0c3fe.tar.bz2 podman-52d5f367b144f755dd20b18d88c5f79bc6b0c3fe.zip |
Merge pull request #12609 from baude/tz
Set machine timezone
Diffstat (limited to 'cmd/podman/machine/init.go')
-rw-r--r-- | cmd/podman/machine/init.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index adde887f7..bee6844df 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -38,7 +38,6 @@ func init() { }) flags := initCmd.Flags() cfg := registry.PodmanConfig() - cpusFlagName := "cpus" flags.Uint64Var( &initOpts.CPUS, @@ -69,6 +68,13 @@ func init() { "now", false, "Start machine now", ) + timezoneFlagName := "timezone" + defaultTz := cfg.TZ() + if len(defaultTz) < 1 { + defaultTz = "local" + } + flags.StringVar(&initOpts.TimeZone, timezoneFlagName, defaultTz, "Set timezone") + _ = initCmd.RegisterFlagCompletionFunc(timezoneFlagName, completion.AutocompleteDefault) ImagePathFlagName := "image-path" flags.StringVar(&initOpts.ImagePath, ImagePathFlagName, cfg.Machine.Image, "Path to qcow image") |