i18n/l10n: Make Timezone configurable and change the default
PATCH 1/1 i18n/l10n: Make Timezone configurable and change the default
* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/London
The overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC
(It appears that there is no reasonable way to find out the Olson TZ name of the controller host's default timezone. If there were, or we discover one, we should arrange that the default is set appropriately.)
--- Osstest.pm | 2 ++ Osstest/Debian.pm | 2 +- production-config-cambridge | 2 ++ ts-freebsd-install | 2 +- ts-redhat-install | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-)
Osstest.pm +2 -0
@@ -76,6 +76,8 @@ our %c = qw( DebianNonfreeFirmware firmware-bnx2 HostnameSortSwapWords 0 + + Timezone UTC ); $c{$_}='' foreach qw(
Osstest/Debian.pm +1 -1
@@ -567,7 +567,7 @@ d-i mirror/country string manual d-i mirror/http/proxy string d-i clock-setup/utc boolean true -d-i time/zone string Europe/London +d-i time/zone string $c{Timezone} d-i clock-setup/ntp boolean true d-i partman-md/device_remove_md boolean true
production-config-cambridge +2 -0
@@ -30,6 +30,8 @@ HostnameSortSwapWords 1 DnsDomain xs.citrite.net NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67 +Timezone Europe/London + Stash /home/xc_osstest/logs Images /home/xc_osstest/images Logs /home/xc_osstest/logs
ts-freebsd-install +1 -1
@@ -82,7 +82,7 @@ END sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys - cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime + cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime cat <<'ENDKEYS' >$mnt/boot/loader.conf boot_multicons="YES"
ts-redhat-install +1 -1
@@ -59,7 +59,7 @@ selinux --disable sshpw --username=root xenroot --plaintext sshpw --username=iwj xenroot --plaintext -timezone --utc Europe/London +timezone --utc $c{Timezone} bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8" # The following is the partition information you requested
Signature · 1 line
1.7.10.4
Quoted 10 lines · Ian Jackson
* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/LondonThe overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC
Quoted 6 lines
(It appears that there is no reasonable way to find out the Olson TZ name of the controller host's default timezone. If there were, or we discover one, we should arrange that the default is set appropriately.)
Signed-off-by Ian Jackson <[email protected]>
(I wouldn't have objected to moving Cambridge to UTC either, lets see how confused we get looking at machines in both pools!)
Quoted 73 lines
--- Osstest.pm | 2 ++ Osstest/Debian.pm | 2 +- production-config-cambridge | 2 ++ ts-freebsd-install | 2 +- ts-redhat-install | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-)Osstest.pm +2
-0@@ -76,6 +76,8 @@ our %c = qw( DebianNonfreeFirmware firmware-bnx2 HostnameSortSwapWords 0 + + Timezone UTC ); $c{$_}='' foreach qw(Osstest/Debian.pm +1
-1@@ -567,7 +567,7 @@ d-i mirror/country string manual d-i mirror/http/proxy string d-i clock-setup/utc boolean true -d-i time/zone string Europe/London +d-i time/zone string $c{Timezone} d-i clock-setup/ntp boolean true d-i partman-md/device_remove_md boolean trueproduction-config-cambridge +2
-0@@ -30,6 +30,8 @@ HostnameSortSwapWords 1 DnsDomain xs.citrite.net NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67 +Timezone Europe/London + Stash /home/xc_osstest/logs Images /home/xc_osstest/images Logs /home/xc_osstest/logsts-freebsd-install +1
-1@@ -82,7 +82,7 @@ END sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys - cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime + cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime cat <<'ENDKEYS' >$mnt/boot/loader.conf boot_multicons="YES"ts-redhat-install +1
-1@@ -59,7 +59,7 @@ selinux --disable sshpw --username=root xenroot --plaintext sshpw --username=iwj xenroot --plaintext -timezone --utc Europe/London +timezone --utc $c{Timezone} bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8" # The following is the partition information you requested
Ian Campbell writes ("Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default"):
Quoted 4 lines · Ian Jackson
Quoted 1 line
Signed-off-by Ian Jackson <[email protected]>Acked-by Ian Campbell <[email protected]>
Thanks.
I've made a new version which also documents the variable in README; I guess you're happy for me to keep your ack.
Ian.
commit 3c425a513e603184b8dd128b28398ceec2aea4b4
Author: Ian Jackson <[email protected]> Date: Fri May 15 11:31:35 2015 +0100
i18n/l10n: Make Timezone configurable and change the default
* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/London
The overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC
(It appears that there is no reasonable way to find out the Olson TZ name of the controller host's default timezone. If there were, or we discover one, we should arrange that the default is set appropriately.)
Osstest.pm +2 -0
@@ -76,6 +76,8 @@ our %c = qw( DebianNonfreeFirmware firmware-bnx2 HostnameSortSwapWords 0 + + Timezone UTC ); $c{$_}='' foreach qw(
Osstest/Debian.pm +1 -1
@@ -567,7 +567,7 @@ d-i mirror/country string manual d-i mirror/http/proxy string d-i clock-setup/utc boolean true -d-i time/zone string Europe/London +d-i time/zone string $c{Timezone} d-i clock-setup/ntp boolean true d-i partman-md/device_remove_md boolean true
README +3 -0
@@ -476,6 +476,9 @@ TftpPxeTemplatesReal Template filename which mg-hosts mkpxedir should make be a symlink to the TftpPxeTemplates. Not used otherwise. +Timezone + Olson TZ name, used by host and guest installers + ======================================== Host-specific config settigs
production-config-cambridge +2 -0
@@ -30,6 +30,8 @@ HostnameSortSwapWords 1 DnsDomain xs.citrite.net NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67 +Timezone Europe/London + Stash /home/xc_osstest/logs Images /home/xc_osstest/images Logs /home/xc_osstest/logs
ts-freebsd-install +1 -1
@@ -82,7 +82,7 @@ END sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys - cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime + cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime cat <<'ENDKEYS' >$mnt/boot/loader.conf boot_multicons="YES"
ts-redhat-install +1 -1
@@ -59,7 +59,7 @@ selinux --disable sshpw --username=root xenroot --plaintext sshpw --username=iwj xenroot --plaintext -timezone --utc Europe/London +timezone --utc $c{Timezone} bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8" # The following is the partition information you requested
Quoted 10 lines · Ian Jackson
Ian Campbell writes ("Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default"):
Quoted 4 lines · Ian Jackson
Quoted 1 line
Signed-off-by Ian Jackson <[email protected]>Acked-by Ian Campbell <[email protected]>Thanks.
I've made a new version which also documents the variable in README; I guess you're happy for me to keep your ack.
Yep!
Quoted 105 lines
Ian.
commit
3c425a513e603184b8dd128b28398ceec2aea4b4Author: Ian Jackson <[email protected]> Date: Fri May 15 11:31:35 2015 +0100i18n/l10n: Make Timezone configurable and change the default
* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/LondonThe overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC(It appears that there is no reasonable way to find out the Olson TZ name of the controller host's default timezone. If there were, or we discover one, we should arrange that the default is set appropriately.)
Signed-off-by Ian Jackson <[email protected]>Osstest.pm +2
-0@@ -76,6 +76,8 @@ our %c = qw( DebianNonfreeFirmware firmware-bnx2 HostnameSortSwapWords 0 + + Timezone UTC ); $c{$_}='' foreach qw(Osstest/Debian.pm +1
-1@@ -567,7 +567,7 @@ d-i mirror/country string manual d-i mirror/http/proxy string d-i clock-setup/utc boolean true -d-i time/zone string Europe/London +d-i time/zone string $c{Timezone} d-i clock-setup/ntp boolean true d-i partman-md/device_remove_md boolean trueREADME +3
-0@@ -476,6 +476,9 @@ TftpPxeTemplatesReal Template filename which mg-hosts mkpxedir should make be a symlink to the TftpPxeTemplates. Not used otherwise. +Timezone + Olson TZ name, used by host and guest installers + ======================================== Host-specific config settigsproduction-config-cambridge +2
-0@@ -30,6 +30,8 @@ HostnameSortSwapWords 1 DnsDomain xs.citrite.net NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67 +Timezone Europe/London + Stash /home/xc_osstest/logs Images /home/xc_osstest/images Logs /home/xc_osstest/logsts-freebsd-install +1
-1@@ -82,7 +82,7 @@ END sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys - cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime + cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime cat <<'ENDKEYS' >$mnt/boot/loader.conf boot_multicons="YES"ts-redhat-install +1
-1@@ -59,7 +59,7 @@ selinux --disable sshpw --username=root xenroot --plaintext sshpw --username=iwj xenroot --plaintext -timezone --utc Europe/London +timezone --utc $c{Timezone} bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8" # The following is the partition information you requested