theforeman/foreman-installer-staypuft — pull request #93 by jistr (2014-09-19 15:17:35+00:00)
Title: BZ#1142182 - provisioned hosts have wrong timezone

https://bugzilla.redhat.com/show_bug.cgi?id=1142182

This adds support for setting timezone. The timezone will be set both
on the Foreman host and on the provisioned hosts. The timezone
defaults to the timezone currently set on the host where
staypuft-installer is run. The implementation should be forward
compatible for when Staypuft will run on EL 7 variants.

How i tested:

Set timezone to "Pacific/Auckland". On Staypuft host after running the installer:

[root@r6-staypuft ~]# cat /etc/sysconfig/clock
ZONE="Pacific/Auckland"
[root@r6-staypuft ~]# date
So zář 20 03:10:42 NZST 2014

On provisioned host:

[root@r7-sp1 ~]# timedatectl
Local time: So 2014-09-20 03:11:57 NZST
Universal time: Pá 2014-09-19 15:11:57 UTC
RTC time: Pá 2014-09-19 15:11:57
Timezone: Pacific/Auckland (NZST, +1200)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Ne 2014-04-06 02:59:59 NZDT
Ne 2014-04-06 02:00:00 NZST
Next DST change: DST begins (the clock jumps one hour forward) at
Ne 2014-09-28 01:59:59 NZST
Ne 2014-09-28 03:00:00 NZDT