From 9d0d5967d6708e4e6f4147de7985a64cb217dedb Mon Sep 17 00:00:00 2001 From: Jacob Kozol Date: Fri, 8 Jan 2021 16:27:51 +0100 Subject: [PATCH] distro/rhel84: use New York as default timezone RHEl 8.4 guest images need to have the default timezone of EST/EDT unless the user specifies one in their blueprint. New York is a major location for this timezone. --- internal/distro/rhel84/distro.go | 2 ++ test/data/manifests/rhel_84-x86_64-ami-boot.json | 8 +++++++- test/data/manifests/rhel_84-x86_64-openstack-boot.json | 8 +++++++- test/data/manifests/rhel_84-x86_64-qcow2-boot.json | 8 +++++++- test/data/manifests/rhel_84-x86_64-vhd-boot.json | 8 +++++++- test/data/manifests/rhel_84-x86_64-vmdk-boot.json | 8 +++++++- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/internal/distro/rhel84/distro.go b/internal/distro/rhel84/distro.go index 575b15b5a..a3d14454c 100644 --- a/internal/distro/rhel84/distro.go +++ b/internal/distro/rhel84/distro.go @@ -295,6 +295,8 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp if timezone != nil { p.AddStage(osbuild.NewTimezoneStage(&osbuild.TimezoneStageOptions{Zone: *timezone})) + } else { + p.AddStage(osbuild.NewTimezoneStage(&osbuild.TimezoneStageOptions{Zone: "America/New_York"})) } if len(ntpServers) > 0 { diff --git a/test/data/manifests/rhel_84-x86_64-ami-boot.json b/test/data/manifests/rhel_84-x86_64-ami-boot.json index ff1861825..ca7299b54 100644 --- a/test/data/manifests/rhel_84-x86_64-ami-boot.json +++ b/test/data/manifests/rhel_84-x86_64-ami-boot.json @@ -3097,6 +3097,12 @@ "language": "en_US" } }, + { + "name": "org.osbuild.timezone", + "options": { + "zone": "America/New_York" + } + }, { "name": "org.osbuild.selinux", "options": { @@ -9216,6 +9222,6 @@ "tuned.service", "unbound-anchor.timer" ], - "timezone": "UTC" + "timezone": "New_York" } } diff --git a/test/data/manifests/rhel_84-x86_64-openstack-boot.json b/test/data/manifests/rhel_84-x86_64-openstack-boot.json index e9be656f4..7b527baec 100644 --- a/test/data/manifests/rhel_84-x86_64-openstack-boot.json +++ b/test/data/manifests/rhel_84-x86_64-openstack-boot.json @@ -3336,6 +3336,12 @@ "language": "en_US" } }, + { + "name": "org.osbuild.timezone", + "options": { + "zone": "America/New_York" + } + }, { "name": "org.osbuild.users", "options": { @@ -9844,6 +9850,6 @@ "tuned.service", "unbound-anchor.timer" ], - "timezone": "UTC" + "timezone": "New_York" } } diff --git a/test/data/manifests/rhel_84-x86_64-qcow2-boot.json b/test/data/manifests/rhel_84-x86_64-qcow2-boot.json index a3f228af8..99afd65e4 100644 --- a/test/data/manifests/rhel_84-x86_64-qcow2-boot.json +++ b/test/data/manifests/rhel_84-x86_64-qcow2-boot.json @@ -3465,6 +3465,12 @@ "language": "en_US" } }, + { + "name": "org.osbuild.timezone", + "options": { + "zone": "America/New_York" + } + }, { "name": "org.osbuild.users", "options": { @@ -10217,6 +10223,6 @@ "tuned.service", "unbound-anchor.timer" ], - "timezone": "UTC" + "timezone": "New_York" } } diff --git a/test/data/manifests/rhel_84-x86_64-vhd-boot.json b/test/data/manifests/rhel_84-x86_64-vhd-boot.json index a394cb7e1..e83c26863 100644 --- a/test/data/manifests/rhel_84-x86_64-vhd-boot.json +++ b/test/data/manifests/rhel_84-x86_64-vhd-boot.json @@ -3291,6 +3291,12 @@ "language": "en_US" } }, + { + "name": "org.osbuild.timezone", + "options": { + "zone": "America/New_York" + } + }, { "name": "org.osbuild.users", "options": { @@ -9754,6 +9760,6 @@ "unbound-anchor.timer", "waagent.service" ], - "timezone": "UTC" + "timezone": "New_York" } } diff --git a/test/data/manifests/rhel_84-x86_64-vmdk-boot.json b/test/data/manifests/rhel_84-x86_64-vmdk-boot.json index d22078710..da56828c7 100644 --- a/test/data/manifests/rhel_84-x86_64-vmdk-boot.json +++ b/test/data/manifests/rhel_84-x86_64-vmdk-boot.json @@ -3153,6 +3153,12 @@ "language": "en_US" } }, + { + "name": "org.osbuild.timezone", + "options": { + "zone": "America/New_York" + } + }, { "name": "org.osbuild.users", "options": { @@ -9363,6 +9369,6 @@ "vgauthd.service", "vmtoolsd.service" ], - "timezone": "UTC" + "timezone": "New_York" } }